From 5aadf31ccc2f2f7ed820fdb665ff023629c4f733 Mon Sep 17 00:00:00 2001 From: Hummeltech <6109326+hummeltech@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:30:18 -0700 Subject: [PATCH] Also account for tileVeryOld state in add_expiry and tile_handler_status (#465) --- src/mod_tile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_tile.c b/src/mod_tile.c index 9234f191..5b2661d4 100644 --- a/src/mod_tile.c +++ b/src/mod_tile.c @@ -509,7 +509,7 @@ static void add_expiry(request_rec *r, struct protocol *cmd) } else { /* Test if the tile we are serving is out of date, then set a low maxAge*/ - if (state == tileOld) { + if (state == tileOld || state == tileVeryOld) { holdoff = (scfg->cache_duration_dirty / 2.0) * (rand() / (RAND_MAX + 1.0)); maxAge = scfg->cache_duration_dirty + holdoff; } else { @@ -1259,7 +1259,7 @@ static int tile_handler_status(request_rec *r) return error_message(r, "Tile is %s. Last rendered at %s. Last accessed at %s. Stored in %s\n\n" "(Dates might not be accurate. Rendering time might be reset to an old date for tile expiry." " Access times might not be updated on all file systems)\n", - (state == tileOld) ? "due to be rendered" : "clean", mtime_str, atime_str, + (state == tileOld || state == tileVeryOld) ? "due to be rendered" : "clean", mtime_str, atime_str, rdata->store->tile_storage_id(rdata->store, cmd->xmlname, cmd->options, cmd->x, cmd->y, cmd->z, storage_id)); }