Skip to content

Commit

Permalink
Merge pull request #2578 from niol/purge_lru-restore-fix
Browse files Browse the repository at this point in the history
properly init cache for purge_lru
  • Loading branch information
xrmx authored Dec 7, 2023
2 parents b693940 + a488187 commit bb5392f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,12 @@ void uwsgi_cache_fix(struct uwsgi_cache *uc) {
if (uci->expires && (!next_scan || next_scan > uci->expires)) {
next_scan = uci->expires;
}
if (!uc->lru_head && !uci->lru_prev) {
uc->lru_head = i;
}
if (!uc->lru_tail && !uci->lru_next) {
uc->lru_tail = i;
}
restored++;
}
else {
Expand Down

0 comments on commit bb5392f

Please sign in to comment.