From 8c3bd6e14eafe4b1d0af509c7abc7e6bd9a97c15 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 14 Apr 2025 17:17:42 -0400 Subject: [SharedCache] Evict file accessors from the global file accessor cache on file metadata destruction Previously we would just let them continue to exist after view destruction, this is fine assuming we expect the user to be re-opening the same cache over and over, but if a user wants to load a bunch of different caches they might want to evict the old file accessors so that COW pages are known to be evicted, along with other paged in memory. --- view/sharedcache/core/SharedCacheView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'view/sharedcache/core/SharedCacheView.cpp') diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp index 4218a2fe..0cd4d82e 100644 --- a/view/sharedcache/core/SharedCacheView.cpp +++ b/view/sharedcache/core/SharedCacheView.cpp @@ -20,8 +20,7 @@ void SharedCacheViewType::Register() // Adjust the global accessor cache to the fdlimit. FileAccessorCache::Global().SetCacheSize(fdLimit); - - // TODO: Register object destructor to clear accessor cache + RegisterSharedCacheControllerDestructor(); static SharedCacheViewType type; -- cgit v1.3.1