comparison OrthancFramework/Sources/Cache/MemoryStringCache.cpp @ 5431:4be5f117aa0d

metrics
author Alain Mazy <am@osimis.io>
date Tue, 21 Nov 2023 10:32:42 +0100
parents 111e21b4f8bc
children 48b8dae6dc77
comparison
equal deleted inserted replaced
5430:b83192e7ad10 5431:4be5f117aa0d
266 assert(currentSize_ >= size); 266 assert(currentSize_ >= size);
267 currentSize_ -= size; 267 currentSize_ -= size;
268 } 268 }
269 269
270 // Post-condition: "currentSize_ <= targetSize" 270 // Post-condition: "currentSize_ <= targetSize"
271 271 }
272 } 272
273 size_t MemoryStringCache::GetCurrentSize() const
274 {
275 boost::mutex::scoped_lock cacheLock(cacheMutex_);
276
277 return currentSize_;
278 }
279
280 size_t MemoryStringCache::GetNumberOfItems() const
281 {
282 boost::mutex::scoped_lock cacheLock(cacheMutex_);
283 return content_.GetSize();
284
285 }
286
273 } 287 }