diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 26e84eed..f450240a 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -9,6 +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 - 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 439ee46e..ab9910f7 100644 --- a/lib/cartodb/varnish.js +++ b/lib/cartodb/varnish.js @@ -35,7 +35,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) {