DEV Community

Nhan Nguyen
Nhan Nguyen

Posted on

Caching data in Angular using ts-cacheable

Image description

One of my favorite ways to cache API requests in Angular is using the ts-cachable library
🐳 Easy to use with decorators
🐳 Customizable caching strategy
🐳 Mutatable cache data
🐳 Caching using local storage or memory
🐳 A lot of configurations
🐳 Only 13.4kb bundle size
🐳 Only 4ms download time

Configuration
Image description

Global Configuration
Image description

Here you can find their NPM package:
https://www.npmjs.com/package/ts-cacheable


Let's get connected! You can find me on:

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay