diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 4828fe2f..b9429a2a 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -52,9 +52,18 @@ var CartodbWindshaft = function(serverOptions) { var surrogateKeysCache = new SurrogateKeysCache(surrogateKeysCacheBackends); function invalidateNamedMap (owner, templateName) { + var startTime = Date.now(); surrogateKeysCache.invalidate(new NamedMapsCacheEntry(owner, templateName), function(err) { + var logMessage = JSON.stringify({ + username: owner, + type: 'named_map_invalidation', + elapsed: Date.now() - startTime, + error: !!err ? JSON.stringify(err.message) : undefined + }); if (err) { - console.warn('Cache: surrogate key invalidation failed'); + console.warn(logMessage); + } else { + console.info(logMessage); } }); }