From 7ec9843046705368f7a0888f8f95f8a0400862ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 31 Dec 2022 22:26:15 +0100 Subject: Storage: fill roots cache on lookup --- src/storage.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/storage.cpp') 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 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; } -- cgit v1.2.3