diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index ded52079..b20212e4 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -82,10 +82,10 @@ var CartodbWindshaft = function(serverOptions) { ws.del(serverOptions.base_url + '/flush_cache', function(req, res){ ws.doCORS(res); Step( - function(){ + function flushCache(){ serverOptions.flushCache(req, serverOptions.cache_enabled ? Cache : null, this); }, - function(err, data){ + function sendResponse(err, data){ if (err){ ws.sendError(res, {error: err.message}, 500, 'DELETE CACHE'); //res.send(500); diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index aaa58fea..3be61a58 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -354,11 +354,17 @@ module.exports = function(){ var that = this; Step( - function(){ + function getParams(){ + // this is mostly to compute req.params.dbname that.req2params(req, this); }, - function(err, data){ - if (err) throw err; + function flushInternalCache(err){ + // TODO: implement this, see + // http://github.com/Vizzuality/Windshaft-cartodb/issues/73 + return true; + }, + function flushVarnishCache(err){ + if (err) { callback(err); return; } if(Cache) { Cache.invalidate_db(req.params.dbname, req.params.table); }