diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-12-31 22:26:15 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-12-31 22:26:15 +0100 |
commit | 7ec9843046705368f7a0888f8f95f8a0400862ba (patch) | |
tree | 0ad725c1c9b9f41d1c3d84114a7b0db6e7b7183e /src/storage.cpp | |
parent | fe58e4472858a9221b0e77e075588214fecf428c (diff) |
Storage: fill roots cache on lookup
Diffstat (limited to 'src/storage.cpp')
-rw-r--r-- | src/storage.cpp | 2 |
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; } |