From 37cf676063d07aef9d674f7e99910031b4d13175 Mon Sep 17 00:00:00 2001 From: Simon Tokumine Date: Tue, 6 Dec 2011 01:46:02 +0000 Subject: [PATCH] set last modified and cache control for varnish --- lib/cartodb/cartodb_windshaft.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 26e84eed..fb424400 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -9,6 +9,8 @@ var CartodbWindshaft = function(serverOptions) { // set the cache chanel info to invalidate the cache on the frontend server serverOptions.afterTileRender = function(req, res, tile, headers, callback) { res.header('X-Cache-Channel', req.params.dbname); + res.header('Last-Modified','Wed, 30 Aug 1978 00:00:00 GMT'); // special date in the past. + res.header('Cache-Control','no-cache,must-revalidate, public'); callback(null, tile, headers); };