My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Tell me about Redis caching flow for nodejs APIs.

AD's photo
AD
·Feb 20, 2018

My approach is as follow:

  • SETEX a key (with some expiry) and the value - response of an endpoint.
  • DELETE the key when a new record is created.

Pretty basic one, what are the other techniques involved? How to decide the time for expiry of cache?

Note : I am using MySQL for persisting data