Get templateHash for static tile request and errored named map instantiations
This commit is contained in:
@@ -511,12 +511,15 @@ TemplateMaps.prototype.instance = function (template, params) {
|
||||
|
||||
// Return a fingerPrint of the object
|
||||
TemplateMaps.prototype.fingerPrint = function (template) {
|
||||
return crypto.createHash('md5')
|
||||
.update(JSON.stringify(template))
|
||||
.digest('hex')
|
||||
;
|
||||
return fingerPrint(template);
|
||||
};
|
||||
|
||||
function fingerPrint (template) {
|
||||
return crypto.createHash('md5').update(JSON.stringify(template)).digest('hex');
|
||||
}
|
||||
|
||||
module.exports.fingerPrint = fingerPrint;
|
||||
|
||||
module.exports.templateName = function templateName (templateId) {
|
||||
var templateIdTokens = templateId.split('@');
|
||||
var name = templateIdTokens[0];
|
||||
|
||||
Reference in New Issue
Block a user