aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.h
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-12-07 11:06:22 +0100
committerPer Larsson <[email protected]>2021-12-07 11:06:22 +0100
commitfdcd769a821adb03b3cf79bb873fe46dfeb02e55 (patch)
treec1fea6b5a9a94403226bc43874a4c65778ddb5a9 /zenserver/cache/structuredcachestore.h
parentFixed bug in container GC. (diff)
downloadzen-fdcd769a821adb03b3cf79bb873fe46dfeb02e55.tar.xz
zen-fdcd769a821adb03b3cf79bb873fe46dfeb02e55.zip
Added support for time based eviction policy in structured cache.
Diffstat (limited to 'zenserver/cache/structuredcachestore.h')
-rw-r--r--zenserver/cache/structuredcachestore.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/zenserver/cache/structuredcachestore.h b/zenserver/cache/structuredcachestore.h
index d3c2227ac..afec8542f 100644
--- a/zenserver/cache/structuredcachestore.h
+++ b/zenserver/cache/structuredcachestore.h
@@ -7,9 +7,7 @@
#include <zencore/iohash.h>
#include <zencore/thread.h>
#include <zencore/uid.h>
-#include <zenstore/basicfile.h>
#include <zenstore/cas.h>
-#include <zenstore/caslog.h>
#include <zenstore/gc.h>
ZEN_THIRD_PARTY_INCLUDES_START
@@ -86,8 +84,8 @@ private:
{
struct BucketValue
{
- uint64_t LastAccess = 0;
- IoBuffer Payload;
+ GcClock::Tick LastAccess{};
+ IoBuffer Payload;
};
RwLock m_bucketLock;
@@ -100,7 +98,6 @@ private:
inline uint64_t TotalSize() const { return m_TotalSize; }
private:
- uint64_t GetCurrentTimeStamp();
std::atomic_uint64_t m_TotalSize{};
};