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) {