Skip to content

Commit 7b21e1a

Browse files
committed
[Backport] Also account for tileVeryOld state in add_expiry and tile_handler_status (#465)
1 parent 42babb0 commit 7b21e1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mod_tile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ static void add_expiry(request_rec *r, struct protocol * cmd)
545545
} else {
546546

547547
/* Test if the tile we are serving is out of date, then set a low maxAge*/
548-
if (state == tileOld) {
548+
if (state == tileOld || state == tileVeryOld) {
549549
holdoff = (scfg->cache_duration_dirty / 2) * (rand() / (RAND_MAX
550550
+ 1.0));
551551
maxAge = scfg->cache_duration_dirty + holdoff;
@@ -1182,7 +1182,7 @@ static int tile_handler_status(request_rec *r)
11821182
return error_message(r, "Tile is %s. Last rendered at %s. Last accessed at %s. Stored in %s\n\n"
11831183
"(Dates might not be accurate. Rendering time might be reset to an old date for tile expiry."
11841184
" Access times might not be updated on all file systems)\n",
1185-
(state == tileOld) ? "due to be rendered" : "clean", mtime_str, atime_str,
1185+
(state == tileOld || state == tileVeryOld) ? "due to be rendered" : "clean", mtime_str, atime_str,
11861186
rdata->store->tile_storage_id(rdata->store, cmd->xmlname, cmd->options, cmd->x, cmd->y, cmd->z, storage_id));
11871187
}
11881188

0 commit comments

Comments
 (0)