From 473a2d55a5037b49a523c2245d1589d9778593bb Mon Sep 17 00:00:00 2001 From: Simon Tokumine Date: Tue, 6 Dec 2011 17:13:56 +0000 Subject: [PATCH] reinstate 304 --- lib/cartodb/cartodb_windshaft.js | 6 +++--- lib/cartodb/varnish.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 2c7820b0..f450240a 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -9,9 +9,9 @@ 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); -// note - not invalidating properly -// 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'); + // note - may not be invalidating properly + res.header('Last-Modified', new Date().toUTCString()); + res.header('Cache-Control', 'no-cache,must-revalidate, public'); callback(null, tile, headers); }; diff --git a/lib/cartodb/varnish.js b/lib/cartodb/varnish.js index d621e45d..80784364 100644 --- a/lib/cartodb/varnish.js +++ b/lib/cartodb/varnish.js @@ -20,7 +20,7 @@ function VarnishClient(host, port, ready_callback) { connect(); - client.on('data', function(data) { + client.on('data', function (data) { data = data.toString(); lines = data.split('\n', 2); if(lines.length == 2) {