Going green: skip analyses table while computing max-age directive
This commit is contained in:
parent
6cdb872bb5
commit
a84184852e
@ -42,5 +42,10 @@ module.exports = function setCacheControlHeader ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
function everyAffectedTablesCanBeInvalidated (affectedTables) {
|
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);
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ describe.only('cache-control header', function () {
|
|||||||
id: 'source_1',
|
id: 'source_1',
|
||||||
type: 'source',
|
type: 'source',
|
||||||
params: {
|
params: {
|
||||||
query: 'select * from populated_places_simple_reduced'
|
query: 'select * from test_table'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
radius: 60000
|
radius: 60000
|
||||||
|
Loading…
Reference in New Issue
Block a user