Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Cache/MemoryStringCache.h @ 5431:4be5f117aa0d
metrics
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 21 Nov 2023 10:32:42 +0100 |
parents | 111e21b4f8bc |
children | 1474fd6ea6c6 |
comparison
equal
deleted
inserted
replaced
5430:b83192e7ad10 | 5431:4be5f117aa0d |
---|---|
68 }; | 68 }; |
69 | 69 |
70 private: | 70 private: |
71 class StringValue; | 71 class StringValue; |
72 | 72 |
73 boost::mutex cacheMutex_; // note: we can not use recursive_mutex with condition_variable | 73 mutable boost::mutex cacheMutex_; // note: we can not use recursive_mutex with condition_variable |
74 boost::condition_variable cacheCond_; | 74 boost::condition_variable cacheCond_; |
75 std::set<std::string> itemsBeingLoaded_; | 75 std::set<std::string> itemsBeingLoaded_; |
76 | 76 |
77 size_t currentSize_; | 77 size_t currentSize_; |
78 size_t maxSize_; | 78 size_t maxSize_; |
89 | 89 |
90 void SetMaximumSize(size_t size); | 90 void SetMaximumSize(size_t size); |
91 | 91 |
92 void Invalidate(const std::string& key); | 92 void Invalidate(const std::string& key); |
93 | 93 |
94 size_t GetCurrentSize() const; | |
95 | |
96 size_t GetNumberOfItems() const; | |
97 | |
94 private: | 98 private: |
95 void Add(const std::string& key, | 99 void Add(const std::string& key, |
96 const std::string& value); | 100 const std::string& value); |
97 | 101 |
98 void Add(const std::string& key, | 102 void Add(const std::string& key, |