Skip to content

Commit 5aadf31

Browse files
authored
Also account for tileVeryOld state in add_expiry and tile_handler_status (openstreetmap#465)
1 parent f645ed0 commit 5aadf31

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
@@ -509,7 +509,7 @@ static void add_expiry(request_rec *r, struct protocol *cmd)
509509
} else {
510510

511511
/* Test if the tile we are serving is out of date, then set a low maxAge*/
512-
if (state == tileOld) {
512+
if (state == tileOld || state == tileVeryOld) {
513513
holdoff = (scfg->cache_duration_dirty / 2.0) * (rand() / (RAND_MAX + 1.0));
514514
maxAge = scfg->cache_duration_dirty + holdoff;
515515
} else {
@@ -1259,7 +1259,7 @@ static int tile_handler_status(request_rec *r)
12591259
return error_message(r, "Tile is %s. Last rendered at %s. Last accessed at %s. Stored in %s\n\n"
12601260
"(Dates might not be accurate. Rendering time might be reset to an old date for tile expiry."
12611261
" Access times might not be updated on all file systems)\n",
1262-
(state == tileOld) ? "due to be rendered" : "clean", mtime_str, atime_str,
1262+
(state == tileOld || state == tileVeryOld) ? "due to be rendered" : "clean", mtime_str, atime_str,
12631263
rdata->store->tile_storage_id(rdata->store, cmd->xmlname, cmd->options, cmd->x, cmd->y, cmd->z, storage_id));
12641264
}
12651265

0 commit comments

Comments
 (0)