dralos / dralos/pilot-be

make the caching middle mode proactive

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

1. add a cachemiddleware
2. create a method to add new data to cache with redisClient.setEx(KEY, CACHE_TIME , DATA)

```
//new middleware to retrive data from cache on redis where present
export const cacheMiddleware = (req, res, next) => {
check if data is present on redis and return that if the case otherwise go next
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.