Skip to content

Commit

Permalink
Also account for tileVeryOld state in add_expiry and tile_handler_status
Browse files Browse the repository at this point in the history
  • Loading branch information
hummeltech committed Aug 17, 2024
1 parent f645ed0 commit f721d15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mod_tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit f721d15

Please sign in to comment.