comparison OrthancFramework/Sources/FileStorage/StorageCache.h @ 4900:ea5f1c6ed07e

fix cache of storage area
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 20 Feb 2022 16:29:33 +0100
parents 43e613a7756b
children f656fb878b50
comparison
equal deleted inserted replaced
4898:181e67f9d129 4900:ea5f1c6ed07e
35 /** 35 /**
36 * Note: this class is thread safe 36 * Note: this class is thread safe
37 **/ 37 **/
38 class ORTHANC_PUBLIC StorageCache : public boost::noncopyable 38 class ORTHANC_PUBLIC StorageCache : public boost::noncopyable
39 { 39 {
40 private:
40 MemoryStringCache cache_; 41 MemoryStringCache cache_;
42
41 public: 43 public:
42 void SetMaximumSize(size_t size); 44 void SetMaximumSize(size_t size);
43 45
44 void Add(const std::string& uuid, 46 void Add(const std::string& uuid,
45 FileContentType contentType, 47 FileContentType contentType,
48 void Add(const std::string& uuid, 50 void Add(const std::string& uuid,
49 FileContentType contentType, 51 FileContentType contentType,
50 const void* buffer, 52 const void* buffer,
51 size_t size); 53 size_t size);
52 54
53 void Invalidate(const std::string& uuid, FileContentType contentType); 55 void Invalidate(const std::string& uuid,
56 FileContentType contentType);
54 57
55 bool Fetch(std::string& value, 58 bool Fetch(std::string& value,
56 const std::string& uuid, 59 const std::string& uuid,
57 FileContentType contentType); 60 FileContentType contentType);
58 61