Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made a in memory cache module and added it to /tasks endpoint #713

Merged
merged 4 commits into from
Sep 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changed return value in cachePool.set function from HTTP status codes…
… to boolean
  • Loading branch information
yash committed Sep 22, 2022
commit df151b7fcffabdf8d577f2bd945444e65d8cb8c1
4 changes: 2 additions & 2 deletions utils/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ const cachePool = (opt = { maximumSize: CACHE_SIZE_MB }) => {
const set = async (key, value) => {
try {
cacheStore.set(key, value);
return 200;
return true;
} catch (err) {
return 500;
return false;
}
};

Expand Down