# HG changeset patch # User Sebastien Jodogne # Date 1779209445 -7200 # Node ID 7811ff03012f4e985dec0cfba2728eb48e9ad3db # Parent 0ffaef5500c1b97488c842b0b77cf60730542042 removed ServerContext::storageCache_ diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue May 19 18:50:45 2026 +0200 @@ -65,6 +65,7 @@ #include "../../Sources/Search/HierarchicalMatcher.h" #include "../../Sources/ServerContext.h" #include "../../Sources/ServerToolbox.h" +#include "../../Sources/ServerTranscoder.h" #include "OrthancPluginDatabase.h" #include "OrthancPluginDatabaseV3.h" #include "OrthancPluginDatabaseV4.h" diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/OrthancGetRequestHandler.cpp --- a/OrthancServer/Sources/OrthancGetRequestHandler.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/OrthancGetRequestHandler.cpp Tue May 19 18:50:45 2026 +0200 @@ -31,6 +31,7 @@ #include "ServerContext.h" #include "ServerJobs/DicomModalityStoreJob.h" #include "ServerJobs/ThreadedInstancesLoader.h" +#include "ServerTranscoder.h" #include #include diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Tue May 19 18:50:45 2026 +0200 @@ -46,13 +46,14 @@ #include "DicomInstanceToStore.h" #include "OrthancConfiguration.h" #include "OrthancRestApi/OrthancRestApi.h" +#include "OutgoingDicomInstance.h" #include "ResourceFinder.h" #include "Search/DatabaseLookup.h" #include "ServerJobs/OrthancJobUnserializer.h" #include "ServerToolbox.h" +#include "ServerTranscoder.h" +#include "SimpleInstanceOrdering.h" #include "StorageCommitmentReports.h" -#include "OutgoingDicomInstance.h" -#include "SimpleInstanceOrdering.h" #include #include @@ -369,10 +370,10 @@ //static_cast(dicomCache_.GetNumberOfItems())); - metricsRegistry_->SetFloatValue("orthanc_storage_cache_size_mb", - static_cast(storageCache_.GetCurrentSize()) / static_cast(1024 * 1024)); - metricsRegistry_->SetIntegerValue("orthanc_storage_cache_count", - static_cast(storageCache_.GetNumberOfItems())); + //metricsRegistry_->SetFloatValue("orthanc_storage_cache_size_mb", + //static_cast(storageCache_.GetCurrentSize()) / static_cast(1024 * 1024)); + //metricsRegistry_->SetIntegerValue("orthanc_storage_cache_count", + //static_cast(storageCache_.GetNumberOfItems())); } @@ -673,7 +674,7 @@ FileContentType type, const std::string& customData) { - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); accessor.Remove(fileUuid, type, customData); } @@ -735,7 +736,7 @@ try { MetricsRegistry::Timer timer(GetMetricsRegistry(), "orthanc_store_dicom_duration_ms"); - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); DicomInstanceHasher hasher(summary); resultPublicId = hasher.HashInstance(); @@ -1159,7 +1160,7 @@ } - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); FileInfo modified; @@ -1578,7 +1579,7 @@ // TODO Should we use "gzip" instead? CompressionType compression = (compressionEnabled_ ? CompressionType_ZlibWithSize : CompressionType_None); - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); assert(attachmentType != FileContentType_Dicom && attachmentType != FileContentType_DicomUntilPixelData); // this method can not be used to store instances diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/ServerContext.h --- a/OrthancServer/Sources/ServerContext.h Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Tue May 19 18:50:45 2026 +0200 @@ -28,14 +28,12 @@ #include "OrthancHttpHandler.h" #include "ServerIndex.h" #include "ServerJobs/IStorageCommitmentFactory.h" -#include "ServerTranscoder.h" #include "../../OrthancFramework/Sources/DataSource/DataSourceReader.h" #include "../../OrthancFramework/Sources/DataSource/DicomDataSource.h" #include "../../OrthancFramework/Sources/DicomParsing/DicomModification.h" -#include "../../OrthancFramework/Sources/FileStorage/StorageAccessor.h" -#include "../../OrthancFramework/Sources/FileStorage/StorageCache.h" #include "../../OrthancFramework/Sources/JobsEngine/JobsEngine.h" +#include "../../OrthancFramework/Sources/MetricsRegistry.h" #include "../../OrthancFramework/Sources/MultiThreading/Semaphore.h" @@ -44,6 +42,7 @@ class DicomElement; class DicomStoreUserConnection; class OrthancPlugins; + class ServerTranscoder; class SharedArchive; class StorageCommitmentReports; class ThreadPool; @@ -195,7 +194,6 @@ ServerIndex index_; IPluginStorageArea& area_; - StorageCache storageCache_; bool compressionEnabled_; bool storeMD5_; @@ -312,7 +310,7 @@ void SetMaximumStorageCacheSize(size_t size) { - return storageCache_.SetMaximumSize(size); + // TODO-Streaming } void SetPatientLevelEnabled(bool enabled); diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp --- a/OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp Tue May 19 18:50:45 2026 +0200 @@ -28,6 +28,7 @@ #include "../../../OrthancFramework/Sources/Logging.h" #include "../../../OrthancFramework/Sources/SerializationToolbox.h" #include "../ServerContext.h" +#include "../ServerTranscoder.h" #include diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp --- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Tue May 19 18:50:45 2026 +0200 @@ -24,10 +24,12 @@ #include "../PrecompiledHeadersServer.h" #include "ResourceModificationJob.h" +#include "../../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h" #include "../../../OrthancFramework/Sources/Logging.h" #include "../../../OrthancFramework/Sources/SerializationToolbox.h" #include "../DicomInstanceToStore.h" #include "../ServerContext.h" +#include "../ServerTranscoder.h" #include #include diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp --- a/OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp Tue May 19 18:50:45 2026 +0200 @@ -27,6 +27,7 @@ #include "../../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h" #include "../../../OrthancFramework/Sources/Logging.h" #include "../ServerContext.h" +#include "../ServerTranscoder.h" static boost::mutex loaderThreadsCounterMutex; static uint32_t loaderThreadsCounter = 0; diff -r 0ffaef5500c1 -r 7811ff03012f OrthancServer/Sources/main.cpp --- a/OrthancServer/Sources/main.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/main.cpp Tue May 19 18:50:45 2026 +0200 @@ -52,6 +52,7 @@ #include "ServerJobs/DicomRetrieveScuBaseJob.h" #include "ServerJobs/StorageCommitmentScpJob.h" #include "ServerToolbox.h" +#include "ServerTranscoder.h" #include "StorageCommitmentReports.h" #include