Mercurial > hg > orthanc
diff OrthancServer/Sources/ServerContext.h @ 4792:434843934307 storage-cache
Added a StorageCache in the StorageAccessor
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 30 Sep 2021 12:14:19 +0200 |
parents | da1edb7d6332 |
children | 7afbb54bd028 |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.h Tue Sep 14 14:51:12 2021 +0200 +++ b/OrthancServer/Sources/ServerContext.h Thu Sep 30 12:14:19 2021 +0200 @@ -43,6 +43,7 @@ #include "../../OrthancFramework/Sources/DicomParsing/DicomModification.h" #include "../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h" #include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h" +#include "../../OrthancFramework/Sources/FileStorage/StorageCache.h" #include "../../OrthancFramework/Sources/MultiThreading/Semaphore.h" @@ -169,6 +170,7 @@ ServerIndex index_; IStorageArea& area_; + StorageCache storageCache_; bool compressionEnabled_; bool storeMD5_; @@ -288,6 +290,11 @@ return index_; } + void SetMaximumStorageCacheSize(size_t size) + { + return storageCache_.SetMaximumSize(size); + } + void SetCompressionEnabled(bool enabled); bool IsCompressionEnabled() const @@ -325,7 +332,10 @@ void ReadDicom(std::string& dicom, const std::string& instancePublicId); - + + void ReadDicomForHeader(std::string& dicom, + const std::string& instancePublicId); + bool ReadDicomUntilPixelData(std::string& dicom, const std::string& instancePublicId);