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
parent
d1be15c28d
commit
8df1d1fbe6
|
@ -38,9 +38,9 @@ M: cache-assoc dispose* clear-assoc ;
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: purge-cache ( cache -- )
|
: purge-cache ( cache -- )
|
||||||
[ assoc>> ] [ max-age>> ] bi V{ } clone [
|
dup [ assoc>> ] [ max-age>> ] bi V{ } clone [
|
||||||
'[
|
'[
|
||||||
nip dup age>> 1 + [ >>age ] keep
|
nip dup age>> 1 + [ >>age ] keep
|
||||||
_ < [ drop t ] [ _ dispose-to f ] if
|
_ < [ drop t ] [ _ dispose-to f ] if
|
||||||
] assoc-filter! drop
|
] assoc-filter >>assoc drop
|
||||||
] keep [ last rethrow ] unless-empty ;
|
] keep [ last rethrow ] unless-empty ;
|
||||||
|
|
Loading…
Reference in New Issue