mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
chore: eslint prefer-template
This commit is contained in:
committed by
Julian Lam
parent
4ee0f1459d
commit
707b55b6a5
@@ -40,12 +40,12 @@ module.exports = function (opts) {
|
||||
if (!Array.isArray(keys)) {
|
||||
keys = [keys];
|
||||
}
|
||||
pubsub.publish(cache.name + ':cache:del', keys);
|
||||
pubsub.publish(`${cache.name}:cache:del`, keys);
|
||||
keys.forEach(key => cacheDel.apply(cache, [key]));
|
||||
};
|
||||
|
||||
cache.reset = function () {
|
||||
pubsub.publish(cache.name + ':cache:reset');
|
||||
pubsub.publish(`${cache.name}:cache:reset`);
|
||||
localReset();
|
||||
};
|
||||
|
||||
@@ -55,11 +55,11 @@ module.exports = function (opts) {
|
||||
cache.misses = 0;
|
||||
}
|
||||
|
||||
pubsub.on(cache.name + ':cache:reset', function () {
|
||||
pubsub.on(`${cache.name}:cache:reset`, function () {
|
||||
localReset();
|
||||
});
|
||||
|
||||
pubsub.on(cache.name + ':cache:del', function (keys) {
|
||||
pubsub.on(`${cache.name}:cache:del`, function (keys) {
|
||||
if (Array.isArray(keys)) {
|
||||
keys.forEach(key => cacheDel.apply(cache, [key]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user