From cc099f55aafff8ae0db8f047c04791bd6bb8442b Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Mon, 11 May 2026 13:30:59 -0700 Subject: [PATCH] do not call destroy on caches without a destroy hook :( --- src/artifact_cache/artifact_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/artifact_cache/artifact_cache.c b/src/artifact_cache/artifact_cache.c index b5920e6c..7ba72310 100644 --- a/src/artifact_cache/artifact_cache.c +++ b/src/artifact_cache/artifact_cache.c @@ -423,7 +423,7 @@ ac_async_tick(void) if(str8_match(n->key, r->key, 0)) { // rjf: eliminate existing values, if any, if they do not match the current - if(!MemoryMatchStruct(&n->val, &val) && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;) + if(cache->destroy != 0 && !MemoryMatchStruct(&n->val, &val) && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;) { if(access_pt_is_expired(&n->access_pt, .time = 0, .update_idxs = 0)) { @@ -545,7 +545,7 @@ ac_async_tick(void) if(str8_match(n->key, r->key, 0)) { // rjf: eliminate existing values, if any, if they do not match the current - if(!MemoryMatchStruct(&n->val, &val) && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;) + if(cache->destroy != 0 && !MemoryMatchStruct(&n->val, &val) && ins_atomic_u64_eval(&n->completion_count) > 0) for(;;) { if(access_pt_is_expired(&n->access_pt, .time = 0, .update_idxs = 0)) {