Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also account for tileVeryOld state in add_expiry and tile_handler_status #465

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading