From c35c36bf81cae52dacf8e3f8dc858bb376ca424b Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Tue, 21 Sep 2021 14:17:23 +0200 Subject: Wired up scrubbing to more higher level services Also moved sharding logic for filecas into a function to redduce cut/pasta --- zenserver/cache/structuredcachestore.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zenserver/cache/structuredcachestore.cpp') diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index 502ca6605..3d80bb14c 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -108,6 +108,13 @@ ZenCacheStore::Flush() void ZenCacheStore::Scrub(ScrubContext& Ctx) { + if (m_LastScrubTime == Ctx.ScrubTimestamp()) + { + return; + } + + m_LastScrubTime = Ctx.ScrubTimestamp(); + m_DiskLayer.Scrub(Ctx); m_MemLayer.Scrub(Ctx); } -- cgit v1.2.3