summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-12-31 22:26:15 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2022-12-31 22:26:15 +0100
commit7ec9843046705368f7a0888f8f95f8a0400862ba (patch)
tree0ad725c1c9b9f41d1c3d84114a7b0db6e7b7183e
parentfe58e4472858a9221b0e77e075588214fecf428c (diff)
Storage: fill roots cache on lookup
-rw-r--r--src/storage.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/storage.cpp b/src/storage.cpp
index c2d097e..9b49e96 100644
--- a/src/storage.cpp
+++ b/src/storage.cpp
@@ -1054,6 +1054,8 @@ vector<Digest> Ref::rootsLocked() const
std::sort(roots.begin(), roots.end());
roots.erase(std::unique(roots.begin(), roots.end()), roots.end());
}
+
+ p->storage->p->rootsCache.emplace(p->digest, roots);
return roots;
}