From 9c21194c68654e2152d70a28cc9261b13a2035a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 9 Jun 2020 12:21:47 +0200 Subject: [PATCH] Set cache buster equal to 0 when there is no affected tables in the mapconfig --- lib/api/middlewares/last-updated-time-layergroup.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/api/middlewares/last-updated-time-layergroup.js b/lib/api/middlewares/last-updated-time-layergroup.js index 1c4a3cab..63c4dac5 100644 --- a/lib/api/middlewares/last-updated-time-layergroup.js +++ b/lib/api/middlewares/last-updated-time-layergroup.js @@ -11,6 +11,10 @@ module.exports = function setLastUpdatedTimeToLayergroup () { } if (!affectedTables) { + res.locals.cache_buster = 0; + layergroup.layergroupid = `${layergroup.layergroupid}:${res.locals.cache_buster}`; + layergroup.last_updated = new Date(res.locals.cache_buster).toISOString(); + return next(); }