summaryrefslogtreecommitdiff
path: root/src/storage.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-08-08 22:25:46 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-08-08 22:50:27 +0200
commit7aa7649e980ff4b335b41eaea34a9a11820c3e2d (patch)
tree0da4b7c4bf0e80e58d75dcac83b052a22a829985 /src/storage.h
parent5cfdbc49647b6be943d01e4ab141b705e9e5c86d (diff)
Generation number of stored objects with caching
Diffstat (limited to 'src/storage.h')
-rw-r--r--src/storage.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/storage.h b/src/storage.h
index 0f7c3bf..ef335b8 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -164,6 +164,9 @@ struct PartialStorage::Priv
optional<Digest> copy(const typename S::Ref &, vector<Digest> *) const;
template<class S>
optional<Digest> copy(const ObjectT<S> &, vector<Digest> *) const;
+
+ mutable mutex generationCacheLock {};
+ mutable unordered_map<Digest, Generation> generationCache {};
};
struct PartialRef::Priv