aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.h
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-10-29 18:17:36 +0200
committerStefan Boberg <[email protected]>2021-10-29 18:17:36 +0200
commiteff472457f4090a4476ced920cea2ea4cbeca7bf (patch)
treecf7d0778af3babd411cdc9666dfd7c627780e159 /zenserver/cache/structuredcachestore.h
parentzenserver-test: Some modifications to avoid ODR violations (diff)
downloadzen-eff472457f4090a4476ced920cea2ea4cbeca7bf.tar.xz
zen-eff472457f4090a4476ced920cea2ea4cbeca7bf.zip
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$.*`)
Diffstat (limited to 'zenserver/cache/structuredcachestore.h')
-rw-r--r--zenserver/cache/structuredcachestore.h7
1 files changed, 4 insertions, 3 deletions
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<std::string, CacheBucket> 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