cache: Don't use in-place filter

This solves a UI corruption problem by not reusing the hashtable when
purging the cache. The root cause of why the hashtable gets corrupted
when filtering in place hasn't been found.

Fixes #1978.
master
Niklas Larsson 2019-10-31 13:34:42 +01:00 committed by Doug Coleman
parent d1be15c28d
commit 8df1d1fbe6
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ M: cache-assoc dispose* clear-assoc ;
PRIVATE>
: purge-cache ( cache -- )
[ assoc>> ] [ max-age>> ] bi V{ } clone [
dup [ assoc>> ] [ max-age>> ] bi V{ } clone [
'[
nip dup age>> 1 + [ >>age ] keep
_ < [ drop t ] [ _ dispose-to f ] if
] assoc-filter! drop
] assoc-filter >>assoc drop
] keep [ last rethrow ] unless-empty ;