set last modified and cache control for varnish

This commit is contained in:
Simon Tokumine 2011-12-06 01:46:02 +00:00
parent 421a0a6efb
commit 37cf676063

View File

@ -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);
};