Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 8d10e2b

Browse files
committed
Fix for cache prefix.
1 parent c486f17 commit 8d10e2b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

initializers/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ helper.checkTrackName = function (track, isStudio) {
11061106
*/
11071107
helper.checkUserExists = function (handle, api, dbConnectionMap, callback) {
11081108
// Check cache first
1109-
var cacheKey = "user-" + handle;
1109+
var cacheKey = "users-" + handle;
11101110
api.helper.getCachedValue(cacheKey, function (err, exists) {
11111111
if (!exists) {
11121112
// If there is no hit in cache then query DB to check user account for existence and cache positive result

initializers/middleware.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ var PRIVATE_ACTIONS = ['getActiveBillingAccounts', 'getClientChallengeCosts', 'g
3838
var calculateCacheKey = function (api, connection) {
3939
var key = '', userId = connection.caller.userId || 0;
4040
if (PRIVATE_ACTIONS.indexOf(connection.action) >= 0) {
41-
key = "action-" + connection.action + '-' + userId + '-' + api.helper.createCacheKey(connection, true);
41+
key = "actions-" + connection.action + '-' + userId + '-' + api.helper.createCacheKey(connection, true);
4242
} else {
43-
key = "action-" + connection.action + '-' + api.helper.createCacheKey(connection, false);
43+
key = "actions-" + connection.action + '-' + api.helper.createCacheKey(connection, false);
4444
}
4545
return key;
4646
};

0 commit comments

Comments
 (0)