From eff472457f4090a4476ced920cea2ea4cbeca7bf Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 29 Oct 2021 18:17:36 +0200 Subject: z$: hooked up bucket traversal for gc added some tests added "test" mode for zenserver, to run any tests embedded in the zenserver (example: `zenserver test -tx=z$.*`) --- zenserver/cache/structuredcachestore.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'zenserver/cache/structuredcachestore.h') diff --git a/zenserver/cache/structuredcachestore.h b/zenserver/cache/structuredcachestore.h index 4753af627..760f4995c 100644 --- a/zenserver/cache/structuredcachestore.h +++ b/zenserver/cache/structuredcachestore.h @@ -101,7 +101,7 @@ private: class ZenCacheDiskLayer { public: - ZenCacheDiskLayer(CasStore& Cas, const std::filesystem::path& RootDir); + explicit ZenCacheDiskLayer(const std::filesystem::path& RootDir); ~ZenCacheDiskLayer(); bool Get(std::string_view Bucket, const IoHash& HashKey, ZenCacheValue& OutValue); @@ -119,7 +119,6 @@ private: */ struct CacheBucket; - CasStore& m_CasStore; std::filesystem::path m_RootDir; RwLock m_Lock; std::unordered_map m_Buckets; // TODO: make this case insensitive @@ -128,7 +127,7 @@ private: class ZenCacheStore { public: - ZenCacheStore(CasStore& Cas, const std::filesystem::path& RootDir); + explicit ZenCacheStore(const std::filesystem::path& RootDir); ~ZenCacheStore(); bool Get(std::string_view Bucket, const IoHash& HashKey, ZenCacheValue& OutValue); @@ -146,4 +145,6 @@ private: uint64_t m_LastScrubTime = 0; }; +void z$_forcelink(); + } // namespace zen -- cgit v1.2.3