Going green: skip analyses table while computing max-age directive

This commit is contained in:
Daniel García Aubert 2019-07-08 18:05:30 +02:00
parent 6cdb872bb5
commit a84184852e
2 changed files with 7 additions and 2 deletions

View File

@ -42,5 +42,10 @@ module.exports = function setCacheControlHeader ({
};
function everyAffectedTablesCanBeInvalidated (affectedTables) {
return affectedTables && affectedTables.getTables().every(table => table.updated_at !== null);
const skipNotUpdatedAtTables = false;
const skipAnalysisCachedTables = true;
return affectedTables &&
affectedTables.getTables(skipNotUpdatedAtTables, skipAnalysisCachedTables)
.every(table => table.updated_at !== null);
}

View File

@ -150,7 +150,7 @@ describe.only('cache-control header', function () {
id: 'source_1',
type: 'source',
params: {
query: 'select * from populated_places_simple_reduced'
query: 'select * from test_table'
}
},
radius: 60000