diff options
| author | Dan Engelbrecht <[email protected]> | 2022-05-06 12:12:09 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-05-06 12:12:09 +0200 |
| commit | 6db10b5a491297d45c14efae453c420f0d7fa58c (patch) | |
| tree | 0006cf2d58168d596bb948219c77f1122c5b3140 /zenserver/cache/structuredcachestore.h | |
| parent | Added GetDirectoryContent utility (diff) | |
| download | zen-6db10b5a491297d45c14efae453c420f0d7fa58c.tar.xz zen-6db10b5a491297d45c14efae453c420f0d7fa58c.zip | |
review feedback and cleanup
Diffstat (limited to 'zenserver/cache/structuredcachestore.h')
| -rw-r--r-- | zenserver/cache/structuredcachestore.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/zenserver/cache/structuredcachestore.h b/zenserver/cache/structuredcachestore.h index 67bb9c7bf..10335890f 100644 --- a/zenserver/cache/structuredcachestore.h +++ b/zenserver/cache/structuredcachestore.h @@ -372,10 +372,13 @@ public: virtual GcStorageSize StorageSize() const override; private: - Ref<ZenCacheNamespace> GetStore(std::string_view Namespace); - std::vector<Ref<ZenCacheNamespace>> GetAllStores() const; - mutable RwLock m_NamespacesLock; - std::unordered_map<std::string, Ref<ZenCacheNamespace>> m_Namespaces; + Ref<ZenCacheNamespace> GetStore(std::string_view Namespace); + void IterateStores(const std::function<void(const Ref<ZenCacheNamespace>& Store)>& Callback) const; + + typedef std::unordered_map<std::string, Ref<ZenCacheNamespace>> NameSpaceMap; + + mutable RwLock m_NamespacesLock; + NameSpaceMap m_Namespaces; }; void z$_forcelink(); |