diff --git a/lib/cartodb/controllers/named_maps.js b/lib/cartodb/controllers/named_maps.js index a0be85b7..6936332f 100644 --- a/lib/cartodb/controllers/named_maps.js +++ b/lib/cartodb/controllers/named_maps.js @@ -56,7 +56,9 @@ NamedMapsController.prototype.sendResponse = function(req, res, resource, header var tablesCacheEntry = new TablesCacheEntry(dbName, result.affectedTables); res.header('X-Cache-Channel', tablesCacheEntry.getCacheChannel()); - self.surrogateKeysCache.tag(res, tablesCacheEntry); + if (result.affectedTables.length > 0) { + self.surrogateKeysCache.tag(res, tablesCacheEntry); + } } self.app.sendResponse(res, [resource, 200]); }