Skip to content

Commit

Permalink
Put back cache
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoJokhan committed Mar 7, 2023
1 parent dcafc05 commit c5fea99
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/cms/lib/modules/openstad-pages/lib/load-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ module.exports = function (req, res, next) {
// if cacheIdeas is turned on, get ideas from cache
// cacheIdeas is old key, should be refactored,
// preferable we always have caching on
// if (globalData.cacheIdeas) {
// let cacheKey = 'tags-' + globalData.siteId;
// tags = cache.get(cacheKey);
// }
if (globalData.cacheIdeas) {
let cacheKey = 'tags-' + globalData.siteId;
tags = cache.get(cacheKey);
}

// if (Array.isArray(tags)) {
// req.data.openstadTags = tags;
// next();
// } else {
if (Array.isArray(tags)) {
req.data.openstadTags = tags;
next();
} else {

var options = {
uri: `${apiUrl}/api/site/${globalData.siteId}/tag`,
Expand Down Expand Up @@ -58,7 +58,7 @@ module.exports = function (req, res, next) {
next();
return null;
});
// }
}
} else {
next();
}
Expand Down

1 comment on commit c5fea99

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published new image: openstad/frontend:feature-group-tags-like-mzm-c5fea99

Please sign in to comment.