aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-12-09 16:34:55 +0100
committerPer Larsson <[email protected]>2021-12-09 16:34:55 +0100
commit5eb29874341e649dcb3f0bb962ce03228267c6c4 (patch)
tree18729415147692ca0167964d3c3e948f0f7e4923 /zenserver/cache/structuredcachestore.cpp
parentAdded options for Z$ max duration and whether to collect small objects. (diff)
downloadzen-5eb29874341e649dcb3f0bb962ce03228267c6c4.tar.xz
zen-5eb29874341e649dcb3f0bb962ce03228267c6c4.zip
Disabled cache tracker.
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index 71e946432..64e597d53 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -71,7 +71,9 @@ ZenCacheStore::ZenCacheStore(CasGc& Gc, const std::filesystem::path& RootDir) :
m_DiskLayer.DiscoverBuckets();
+#if ZEN_USE_CACHE_TRACKER
m_AccessTracker.reset(new ZenCacheTracker(RootDir));
+#endif
}
ZenCacheStore::~ZenCacheStore()
@@ -83,12 +85,14 @@ ZenCacheStore::Get(std::string_view InBucket, const IoHash& HashKey, ZenCacheVal
{
bool Ok = m_MemLayer.Get(InBucket, HashKey, OutValue);
+#if ZEN_USE_CACHE_TRACKER
auto _ = MakeGuard([&] {
if (!Ok)
return;
m_AccessTracker->TrackAccess(InBucket, HashKey);
});
+#endif
if (Ok)
{