diff --git a/lib/cartodb/cache_validator.js b/lib/cartodb/cache_validator.js index afb3e2e5..30cbb601 100644 --- a/lib/cartodb/cache_validator.js +++ b/lib/cartodb/cache_validator.js @@ -39,8 +39,8 @@ function generateCacheChannel(req, callback){ callback(channelCache[sql_md5]); } else{ // strip out windshaft/mapnik inserted sql - var sql = req.params.sql.match(/^\((.*)\)\sas\scdbq$/)[1]; - //sql = (sql != null) ? sql[1] : req.params.sql; + var sql = req.params.sql.match(/^\((.*)\)\sas\scdbq$/); + sql = (sql != null) ? sql[1] : req.params.sql; // build up api string var sqlapi = api.protocol + '://' + username + '.' + api.host + ':' + api.port + '/api/' + api.version + '/sql'