diff options
| author | Stefan Boberg <[email protected]> | 2021-09-21 14:17:23 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-21 14:17:23 +0200 |
| commit | c35c36bf81cae52dacf8e3f8dc858bb376ca424b (patch) | |
| tree | 891475f41d4c8be86cbb3f2bd6c269f596ff668d /zenserver/cache/structuredcache.cpp | |
| parent | Removed scrubbing from CasImpl::Initialize since this is triggered by higher ... (diff) | |
| download | zen-c35c36bf81cae52dacf8e3f8dc858bb376ca424b.tar.xz zen-c35c36bf81cae52dacf8e3f8dc858bb376ca424b.zip | |
Wired up scrubbing to more higher level services
Also moved sharding logic for filecas into a function to redduce cut/pasta
Diffstat (limited to 'zenserver/cache/structuredcache.cpp')
| -rw-r--r-- | zenserver/cache/structuredcache.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp index 7f1fe7b44..533fea498 100644 --- a/zenserver/cache/structuredcache.cpp +++ b/zenserver/cache/structuredcache.cpp @@ -176,7 +176,16 @@ HttpStructuredCacheService::Flush() void HttpStructuredCacheService::Scrub(ScrubContext& Ctx) { - ZEN_UNUSED(Ctx); + if (m_LastScrubTime == Ctx.ScrubTimestamp()) + { + return; + } + + m_LastScrubTime = Ctx.ScrubTimestamp(); + + m_CasStore.Scrub(Ctx); + m_CidStore.Scrub(Ctx); + m_CacheStore.Scrub(Ctx); } void |