Use template string
This commit is contained in:
parent
d99e5a44f5
commit
b55c2ec55c
@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
const NamedMapMapConfigProvider = require('../models/mapconfig/provider/named-map-provider');
|
||||
const templateName = require('../backends/template_maps').templateName;
|
||||
|
||||
const LruCache = require("lru-cache");
|
||||
|
||||
const NamedMapMapConfigProvider = require('../models/mapconfig/provider/named-map-provider');
|
||||
const { templateName } = require('../backends/template_maps');
|
||||
|
||||
const TEN_MINUTES_IN_MILLISECONDS = 1000 * 60 * 10;
|
||||
const ACTIONS = ['update', 'delete'];
|
||||
|
||||
@ -63,7 +63,7 @@ NamedMapProviderCache.prototype.invalidate = function(user, templateId) {
|
||||
};
|
||||
|
||||
function createNamedMapKey (user, templateId) {
|
||||
return user + ':' + templateName(templateId);
|
||||
return `${user}:${templateName(templateId)}`;
|
||||
}
|
||||
|
||||
const providerKeyTpl = ctx => `${ctx.authToken}:${ctx.configHash}:${ctx.format}:${ctx.layer}:${ctx.scale_factor}`;
|
||||
|
Loading…
Reference in New Issue
Block a user