Skip to content

Commit

Permalink
fix: clearing cache was clearinng download request data count
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed May 25, 2023
1 parent 5e685a8 commit 627500c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/apps/api/v1/cache/cache.queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ export async function deleteAllCachesOfAUser(user_id) {

keys.forEach((key) => {
if (key.includes(`user-id-${user_id}`)) {
logger.info(`Deleted redis cache ${key}!`);
redis.del(key);
if (key === `user-id-${user_id}-request-download-user-data`) {
logger.info(`Skipping ${key} count!`);
} else {
redis.del(key);
logger.info(`Deleted redis cache ${key}!`);
}
}
});
});
Expand Down

0 comments on commit 627500c

Please sign in to comment.