aboutsummaryrefslogtreecommitdiff
path: root/zenstore/CAS.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-09-21 15:10:49 +0200
committerPer Larsson <[email protected]>2021-09-21 15:10:49 +0200
commit9451d4019fd57c7b8f967b4188e40c4b0636f85e (patch)
tree4cdafb5bdd3c17bf257b467fae5abfcd0e664c9b /zenstore/CAS.cpp
parentRefactored out get/set cache record. (diff)
parentMerge branch 'main' of https://github.com/EpicGames/zen (diff)
downloadzen-9451d4019fd57c7b8f967b4188e40c4b0636f85e.tar.xz
zen-9451d4019fd57c7b8f967b4188e40c4b0636f85e.zip
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenstore/CAS.cpp')
-rw-r--r--zenstore/CAS.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/zenstore/CAS.cpp b/zenstore/CAS.cpp
index 916e7f709..a3837d159 100644
--- a/zenstore/CAS.cpp
+++ b/zenstore/CAS.cpp
@@ -111,9 +111,6 @@ CasImpl::Initialize(const CasStoreConfiguration& InConfig)
m_TinyStrategy.Initialize("tobs", 16, IsNewStore);
m_SmallStrategy.Initialize("sobs", 4096, IsNewStore);
-
- ScrubContext Ctx;
- Scrub(Ctx);
}
CasStore::InsertResult
@@ -176,6 +173,13 @@ CasImpl::Flush()
void
CasImpl::Scrub(ScrubContext& Ctx)
{
+ if (m_LastScrubTime == Ctx.ScrubTimestamp())
+ {
+ return;
+ }
+
+ m_LastScrubTime = Ctx.ScrubTimestamp();
+
m_SmallStrategy.Scrub(Ctx);
m_TinyStrategy.Scrub(Ctx);
m_LargeStrategy.Scrub(Ctx);