diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 063e0572..b0040668 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -25,23 +25,6 @@ var CartodbWindshaft = function(serverOptions) { var cartoData = require('cartodb-redis')({pool: redisPool}); - if(serverOptions.cache_enabled) { - console.log("cache invalidation enabled, varnish on ", serverOptions.varnish_host, ' ', serverOptions.varnish_port); - Cache.init(serverOptions.varnish_host, serverOptions.varnish_port, serverOptions.varnish_secret); - serverOptions.afterStateChange = function(req, data, callback) { - Cache.invalidate_db(req.params.dbname, req.params.table); - callback(null, data); - } - } - - serverOptions.beforeStateChange = function(req, callback) { - var err = null; - if ( ! req.params.hasOwnProperty('_authorizedByApiKey') ) { - err = new Error("map state cannot be changed by unauthenticated request!"); - } - callback(err, req); - }; - // This is for Templated maps // // "named" is the official, "template" is for backward compatibility up to 1.6.x