Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Cache/MemoryStringCache.cpp @ 4279:ab4d015af660
moving inline methods to source files for ABI compatibility
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 20:48:01 +0100 |
parents | fbc49a65340a |
children | 785a2713323e |
comparison
equal
deleted
inserted
replaced
4278:9279de56a405 | 4279:ab4d015af660 |
---|---|
45 { | 45 { |
46 return content_.size(); | 46 return content_.size(); |
47 } | 47 } |
48 }; | 48 }; |
49 | 49 |
50 size_t Orthanc::MemoryStringCache::GetMaximumSize() | |
51 { | |
52 return cache_.GetMaximumSize(); | |
53 } | |
54 | |
55 void MemoryStringCache::SetMaximumSize(size_t size) | |
56 { | |
57 cache_.SetMaximumSize(size); | |
58 } | |
50 | 59 |
51 void MemoryStringCache::Add(const std::string& key, | 60 void MemoryStringCache::Add(const std::string& key, |
52 const std::string& value) | 61 const std::string& value) |
53 { | 62 { |
54 cache_.Acquire(key, new StringValue(value)); | 63 cache_.Acquire(key, new StringValue(value)); |
55 } | 64 } |
56 | 65 |
66 void MemoryStringCache::Invalidate(const std::string &key) | |
67 { | |
68 cache_.Invalidate(key); | |
69 } | |
57 | 70 |
58 bool MemoryStringCache::Fetch(std::string& value, | 71 bool MemoryStringCache::Fetch(std::string& value, |
59 const std::string& key) | 72 const std::string& key) |
60 { | 73 { |
61 MemoryObjectCache::Accessor reader(cache_, key, false /* multiple readers are allowed */); | 74 MemoryObjectCache::Accessor reader(cache_, key, false /* multiple readers are allowed */); |