diff 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
line wrap: on
line diff
--- a/OrthancFramework/Sources/Cache/MemoryStringCache.h	Mon Nov 20 17:01:48 2023 +0100
+++ b/OrthancFramework/Sources/Cache/MemoryStringCache.h	Tue Nov 21 10:32:42 2023 +0100
@@ -70,7 +70,7 @@
   private:
     class StringValue;
 
-    boost::mutex              cacheMutex_;  // note: we can not use recursive_mutex with condition_variable
+    mutable boost::mutex      cacheMutex_;  // note: we can not use recursive_mutex with condition_variable
     boost::condition_variable cacheCond_;
     std::set<std::string>     itemsBeingLoaded_;
 
@@ -91,6 +91,10 @@
 
     void Invalidate(const std::string& key);
 
+    size_t GetCurrentSize() const;
+    
+    size_t GetNumberOfItems() const;
+
   private:
     void Add(const std::string& key,
              const std::string& value);