update clear cache
All checks were successful
Deploy to Production / deploy (push) Successful in 20s

This commit is contained in:
silverpro89
2026-01-28 19:54:59 +07:00
parent fa5c293a7e
commit b34bd7a4e3
5 changed files with 21 additions and 81 deletions

View File

@@ -18,6 +18,7 @@ class GameController {
const cacheKey = `games:list:${page}:${limit}:${type || 'all'}:${is_active || 'all'}:${is_premium || 'all'}:${difficulty_level || 'all'}`;
const cached = await cacheUtils.get(cacheKey);
/*
if (cached) {
return res.json({
success: true,
@@ -25,6 +26,7 @@ class GameController {
cached: true,
});
}
*/
const where = {};
if (type) where.type = type;
@@ -294,6 +296,7 @@ class GameController {
const cacheKey = `games:type:${type}:${only_active}`;
const cached = await cacheUtils.get(cacheKey);
/*
if (cached) {
return res.json({
success: true,
@@ -301,7 +304,7 @@ class GameController {
cached: true,
});
}
*/
const where = { type };
if (only_active === 'true') where.is_active = true;