From 255462493f6e10e253965e65ea6d3d59408000a0 Mon Sep 17 00:00:00 2001 From: "Mr.Crowley" Date: Fri, 15 Aug 2025 23:57:31 -0500 Subject: [PATCH] cache error fix --- lib/cache/shared/cache.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cache/shared/cache.lua b/lib/cache/shared/cache.lua index dfd76d1..3fd9abd 100644 --- a/lib/cache/shared/cache.lua +++ b/lib/cache/shared/cache.lua @@ -128,11 +128,8 @@ local function trackResource(resourceName, type, data) for _, cb in ipairs(resourceTracker.callbacks[resourceName] or {}) do local targetCache = Cache.Caches[cb.cacheName] if targetCache then - table.remove(targetCache.OnChange, cb.index) - debugPrint(("Removed OnChange callback from cache '%s' - resource '%s' stopped"):format( - cb.cacheName, - resourceName - )) + targetCache.OnChange[cb.index] = nil + debugPrint(("Removed callback '%s' from cache '%s' - resource '%s' stopped"):format(cb.index, cb.cacheName, resourceName)) end end