From c0afd42fa21896364f6c3442dfa2958d92b6d9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 13 Sep 2019 17:53:10 +0200 Subject: [PATCH] Use template strings instead of dot module --- lib/cartodb/cache/named_map_provider_cache.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cartodb/cache/named_map_provider_cache.js b/lib/cartodb/cache/named_map_provider_cache.js index 94ca074c..0160eb20 100644 --- a/lib/cartodb/cache/named_map_provider_cache.js +++ b/lib/cartodb/cache/named_map_provider_cache.js @@ -1,7 +1,6 @@ 'use strict'; var _ = require('underscore'); -var dot = require('dot'); var NamedMapMapConfigProvider = require('../models/mapconfig/provider/named-map-provider'); var templateName = require('../backends/template_maps').templateName; @@ -68,8 +67,7 @@ function createNamedMapKey(user, templateId) { return user + ':' + templateName(templateId); } -var providerKey = '{{=it.authToken}}:{{=it.configHash}}:{{=it.format}}:{{=it.layer}}:{{=it.scale_factor}}'; -var providerKeyTpl = dot.template(providerKey); +var providerKeyTpl = ctx => `${ctx.authToken}:${ctx.configHash}:${ctx.format}:${ctx.layer}:${ctx.scale_factor}`; function createProviderKey(config, authToken, params) { var tplValues = _.defaults({}, params, {