Redis cache service for Nest framework.
npm install
# start Redis if you don't have it running
$ sudo docker run --name redis-container -p 6379:6379 -d redis
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
App exposes the following GET routes for interacting with the cache:
http://localhost:3000/clear-cache
where you can clear Redis cachehttp://localhost:3000/item/:id
where you can read immediate random values first generated then from cachehttp://localhost:3000/slow-item/:id
on first call it takes 5 secs to get the value, after that it is read from cache without TTLhttp://localhost:3000/slow-ttl-item/:id
on first call it takes 5 secs to get the value, after that it is read from cache with 10 sec TTL