Only invalidate cache on del style when caching is enabled

This commit is contained in:
Sandro Santilli 2012-10-05 16:55:58 +02:00
parent 0a57e791d5
commit 7196c8c285
2 changed files with 4 additions and 2 deletions

View File

@ -73,7 +73,7 @@ var CartodbWindshaft = function(serverOptions) {
ws.doCORS(res);
Step(
function(){
serverOptions.flushCache(req, Cache, this);
serverOptions.flushCache(req, serverOptions.cache_enabled ? Cache : null, this);
},
function(err, data){
if (err){

View File

@ -155,7 +155,9 @@ module.exports = function(){
},
function(err, data){
if (err) throw err;
Cache.invalidate_db(req.params.dbname, req.params.table);
if(Cache) {
Cache.invalidate_db(req.params.dbname, req.params.table);
}
callback(null, true);
}
);