Mercurial > hg > orthanc
diff OrthancFramework/Sources/Cache/MemoryObjectCache.cpp @ 4457:789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 19 Jan 2021 19:05:04 +0100 |
parents | 3e4f7b7840f0 |
children | 7053502fbf97 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/Cache/MemoryObjectCache.cpp Tue Jan 19 16:11:23 2021 +0100 +++ b/OrthancFramework/Sources/Cache/MemoryObjectCache.cpp Tue Jan 19 19:05:04 2021 +0100 @@ -99,6 +99,16 @@ } + size_t MemoryObjectCache::GetNumberOfItems() + { +#if !defined(__EMSCRIPTEN__) + boost::mutex::scoped_lock lock(cacheMutex_); +#endif + + return content_.GetSize(); + } + + size_t MemoryObjectCache::GetCurrentSize() { #if !defined(__EMSCRIPTEN__)