set last modified and cache control for varnish
This commit is contained in:
parent
421a0a6efb
commit
37cf676063
@ -9,6 +9,8 @@ var CartodbWindshaft = function(serverOptions) {
|
|||||||
// set the cache chanel info to invalidate the cache on the frontend server
|
// set the cache chanel info to invalidate the cache on the frontend server
|
||||||
serverOptions.afterTileRender = function(req, res, tile, headers, callback) {
|
serverOptions.afterTileRender = function(req, res, tile, headers, callback) {
|
||||||
res.header('X-Cache-Channel', req.params.dbname);
|
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);
|
callback(null, tile, headers);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user