lower chunk cache age

ad log for ranking update
This commit is contained in:
HF 2022-04-05 02:07:10 +02:00
parent cdf7a4a1d8
commit 90ffc5fd1a
2 changed files with 3 additions and 2 deletions

View File

@ -34,6 +34,7 @@ class Ranks {
} }
async updateRanking() { async updateRanking() {
logger.info('Update pixel rankings');
// recalculate ranking column // recalculate ranking column
await Model.query( await Model.query(
// eslint-disable-next-line max-len // eslint-disable-next-line max-len

View File

@ -18,7 +18,7 @@ import logger from '../core/logger';
const chunkEtags = new Map(); const chunkEtags = new Map();
RedisCanvas.setChunkChangeCallback((canvasId, cell) => { RedisCanvas.setChunkChangeCallback((canvasId, cell) => {
const [x, y] = cell; const [x, y] = cell;
const ret = chunkEtags.delete(`${canvasId}:${x}:${y}`); chunkEtags.delete(`${canvasId}:${x}:${y}`);
}); });
/* /*
@ -65,7 +65,7 @@ export default async (req: Request, res: Response, next) => {
} }
res.set({ res.set({
'Cache-Control': `public, s-maxage=${60 * 2}, max-age=${50 * 2}`, // seconds 'Cache-Control': `public, s-maxage=${60}, max-age=${40}`, // seconds
'Content-Type': 'application/octet-stream', 'Content-Type': 'application/octet-stream',
}); });