Shared cache for affected tables in layergroup and map controllers

This commit is contained in:
Raul Ochoa
2015-07-14 13:40:41 +02:00
parent c295584864
commit e8b5845174
8 changed files with 120 additions and 63 deletions
+2 -2
View File
@@ -318,7 +318,7 @@ describe('tests from old api translated to multilayer', function() {
var parsed = JSON.parse(res.body);
assert.deepEqual(parsed, {
errors: ["Error: could not fetch affected tables and last updated time: fake error message"]
errors: ["Error: could not fetch affected tables or last updated time: fake error message"]
});
done();
@@ -346,7 +346,7 @@ describe('tests from old api translated to multilayer', function() {
};
// reset internal cacheChannel cache
server.channelCache = {};
server.layergroupAffectedTablesCache.cache = {};
assert.response(server,
{
+2 -2
View File
@@ -21,7 +21,7 @@ var server = new CartodbWindshaft(serverOptions);
server.setMaxListeners(0);
describe('template_api', function() {
server.channelCache = {};
server.layergroupAffectedTablesCache.cache = {};
var redis_client = redis.createClient(global.environment.redis.port);
@@ -1155,7 +1155,7 @@ describe('template_api', function() {
assert.ok(cc);
assert.ok(cc.match, /ciao/, cc);
// hack simulating restart...
server.channelCache = {}; // need to clean channel cache
server.layergroupAffectedTablesCache.cache = {}; // need to clean channel cache
var get_request = {
url: '/api/v1/map/' + layergroupid + ':cb1/0/0/0/1.json.torque?auth_token=valid1',
method: 'GET',