Not adding surrogate keys for empty affected tables

This commit is contained in:
Raul Ochoa
2015-07-14 20:53:26 +02:00
parent 07c920bad5
commit 722705468f
+3 -1
View File
@@ -56,7 +56,9 @@ NamedMapsController.prototype.sendResponse = function(req, res, resource, header
var tablesCacheEntry = new TablesCacheEntry(dbName, result.affectedTables);
res.header('X-Cache-Channel', tablesCacheEntry.getCacheChannel());
self.surrogateKeysCache.tag(res, tablesCacheEntry);
if (result.affectedTables.length > 0) {
self.surrogateKeysCache.tag(res, tablesCacheEntry);
}
}
self.app.sendResponse(res, [resource, 200]);
}