From 1a66f96379ce2f515e4bc998deb92ebdf0a7a53b Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 28 Apr 2015 16:14:19 +0200 Subject: [PATCH] Adds custom cache control header for named map static images --- lib/cartodb/controllers/named_static_maps.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cartodb/controllers/named_static_maps.js b/lib/cartodb/controllers/named_static_maps.js index fa7a6e8d..b1395eb0 100644 --- a/lib/cartodb/controllers/named_static_maps.js +++ b/lib/cartodb/controllers/named_static_maps.js @@ -189,6 +189,7 @@ NamedStaticMapsController.prototype.named = function(req, res) { self.app.sendError(res, err, self.app.findStatusCode(err), 'STATIC_VIZ_MAP', err); } else { res.setHeader('Content-Type', headers['Content-Type'] || 'image/' + format); + res.setHeader('Cache-Control', 'public,max-age=7200,must-revalidate'); self.app.sendResponse(res, [image, 200]); } }