aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.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 /zenserver/cache/structuredcachestore.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 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp7
1 files changed, 7 insertions, 0 deletions
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);
}