Skip to content

Commit da93de6

Browse files
committed
cache key expanded
1 parent 94c66b9 commit da93de6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/controllers/categoriesController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ const listCategories = async (req, res) => {
6262
// Include onlyname and fields in cache key calculation
6363
const customCacheKeyData = {
6464
onlyname: req.query.onlyname || false,
65-
fields: req.query.fields
65+
fields: req.query.fields,
66+
category: req.query.category ? validateArrayParameter(req.query.category, 'category') : [],
67+
client: req.query.client || 'mobile',
6668
};
6769

6870
await executeQuery(req, res, 'categories', queryBuilder, dataProcessor, customCacheKeyData);

src/controllers/technologiesController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ const listTechnologies = async (req, res) => {
6969
// Include onlyname and fields in cache key calculation
7070
const customCacheKeyData = {
7171
onlyname: req.query.onlyname || false,
72-
fields: req.query.fields
72+
fields: req.query.fields,
73+
technology: req.query.technology ? validateTechnologyArray(req.query.technology) : [],
74+
category: req.query.category ? validateArrayParameter(req.query.category, 'category') : [],
7375
};
7476

7577
await executeQuery(req, res, 'technologies', queryBuilder, dataProcessor, customCacheKeyData);

0 commit comments

Comments
 (0)