changeset 6894:c24787295b61 streaming

removed class StorageCache
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 01 Jun 2026 21:23:59 +0200
parents f428f468ab02
children 4372fdde043a
files OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake OrthancFramework/Sources/FileStorage/StorageAccessor.cpp OrthancFramework/Sources/FileStorage/StorageAccessor.h OrthancFramework/Sources/FileStorage/StorageCache.cpp OrthancFramework/Sources/FileStorage/StorageCache.h OrthancFramework/UnitTestsSources/FileStorageTests.cpp OrthancServer/Sources/ServerToolbox.cpp OrthancServer/UnitTestsSources/SizeOfTests.cpp OrthancServer/UnitTestsSources/SizeOfTests.impl.h
diffstat 9 files changed, 7 insertions(+), 536 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Mon Jun 01 21:23:59 2026 +0200
@@ -404,7 +404,6 @@
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Compression/HierarchicalZipWriter.cpp
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Compression/ZipWriter.cpp
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/FileStorage/StorageAccessor.cpp
-      ${CMAKE_CURRENT_LIST_DIR}/../../Sources/FileStorage/StorageCache.cpp
       )
   endif()
 endif()
--- a/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp	Mon Jun 01 21:23:59 2026 +0200
@@ -24,7 +24,6 @@
 
 #include "../PrecompiledHeaders.h"
 #include "StorageAccessor.h"
-#include "StorageCache.h"
 
 #include "../Logging.h"
 #include "../StringMemoryBuffer.h"
@@ -47,8 +46,6 @@
 static const std::string METRICS_REMOVE_DURATION = "orthanc_storage_remove_duration_ms";
 static const std::string METRICS_READ_BYTES = "orthanc_storage_read_bytes";
 static const std::string METRICS_WRITTEN_BYTES = "orthanc_storage_written_bytes";
-static const std::string METRICS_CACHE_HIT_COUNT = "orthanc_storage_cache_hit_count";
-static const std::string METRICS_CACHE_MISS_COUNT = "orthanc_storage_cache_miss_count";
 
 
 namespace Orthanc
@@ -72,34 +69,14 @@
 
   StorageAccessor::StorageAccessor(IPluginStorageArea& area) :
     area_(area),
-    cache_(NULL),
     metrics_(NULL)
   {
   }
   
 
   StorageAccessor::StorageAccessor(IPluginStorageArea& area,
-                                   StorageCache& cache) :
-    area_(area),
-    cache_(&cache),
-    metrics_(NULL)
-  {
-  }
-
-
-  StorageAccessor::StorageAccessor(IPluginStorageArea& area,
                                    MetricsRegistry& metrics) :
     area_(area),
-    cache_(NULL),
-    metrics_(&metrics)
-  {
-  }
-
-  StorageAccessor::StorageAccessor(IPluginStorageArea& area,
-                                   StorageCache& cache,
-                                   MetricsRegistry& metrics) :
-    area_(area),
-    cache_(&cache),
     metrics_(&metrics)
   {
   }
@@ -151,12 +128,6 @@
           metrics_->IncrementIntegerValue(METRICS_WRITTEN_BYTES, static_cast<int64_t>(size));
         }
         
-        if (cache_ != NULL)
-        {
-          StorageCache::Accessor cacheAccessor(*cache_);
-          cacheAccessor.Add(uuid, type, data, size);
-        }
-
         info = FileInfo(uuid, type, size, md5);
         info.SetCustomData(customData);
         return;
@@ -194,12 +165,6 @@
           metrics_->IncrementIntegerValue(METRICS_WRITTEN_BYTES, static_cast<int64_t>(compressed.size()));
         }
 
-        if (cache_ != NULL)
-        {
-          StorageCache::Accessor cacheAccessor(*cache_);
-          cacheAccessor.Add(uuid, type, data, size);    // always add uncompressed data to cache
-        }
-
         info = FileInfo(uuid, type, size, md5,
                         CompressionType_ZlibWithSize, compressed.size(), compressedMD5);
         info.SetCustomData(customData);
@@ -211,39 +176,10 @@
     }
   }
 
+
   void StorageAccessor::Read(std::string& content,
                              const FileInfo& info)
   {
-    if (cache_ == NULL)
-    {
-      ReadWholeInternal(content, info);
-    }
-    else
-    {
-      StorageCache::Accessor cacheAccessor(*cache_);
-
-      if (!cacheAccessor.Fetch(content, info.GetUuid(), info.GetContentType()))
-      {
-        if (metrics_ != NULL)
-        {
-          metrics_->IncrementIntegerValue(METRICS_CACHE_MISS_COUNT, 1);
-        }
-
-        ReadWholeInternal(content, info);
-
-        // always store the uncompressed data in cache
-        cacheAccessor.Add(info.GetUuid(), info.GetContentType(), content);
-      } 
-      else if (metrics_ != NULL)
-      {
-        metrics_->IncrementIntegerValue(METRICS_CACHE_HIT_COUNT, 1);
-      }
-    }
-  }
-
-  void StorageAccessor::ReadWholeInternal(std::string& content,
-                                          const FileInfo& info)
-  {
     switch (info.GetCompressionType())
     {
       case CompressionType_None:
@@ -299,35 +235,6 @@
   void StorageAccessor::ReadRaw(std::string& content,
                                 const FileInfo& info)
   {
-    if (cache_ == NULL || info.GetCompressionType() != CompressionType_None)
-    {
-      ReadRawInternal(content, info);
-    }
-    else
-    {// use the cache only if the data is uncompressed.
-      StorageCache::Accessor cacheAccessor(*cache_);
-
-      if (!cacheAccessor.Fetch(content, info.GetUuid(), info.GetContentType()))
-      {
-        if (metrics_ != NULL)
-        {
-          metrics_->IncrementIntegerValue(METRICS_CACHE_MISS_COUNT, 1);
-        }
-
-        ReadRawInternal(content, info);
-
-        cacheAccessor.Add(info.GetUuid(), info.GetContentType(), content);
-      }
-      else if (metrics_ != NULL)
-      {
-        metrics_->IncrementIntegerValue(METRICS_CACHE_HIT_COUNT, 1);
-      }
-    }
-  }
-
-  void StorageAccessor::ReadRawInternal(std::string& content,
-                                        const FileInfo& info)
-  {
     std::unique_ptr<IMemoryBuffer> buffer;
 
     {
@@ -348,11 +255,6 @@
                                FileContentType type,
                                const std::string& customData)
   {
-    if (cache_ != NULL)
-    {
-      cache_->Invalidate(fileUuid, type);
-    }
-
     {
       MetricsTimer timer(*this, METRICS_REMOVE_DURATION);
       area_.Remove(fileUuid, type, customData);
@@ -370,55 +272,6 @@
                                        const FileInfo& info,
                                        uint64_t end /* exclusive */)
   {
-    if (cache_ == NULL)
-    {
-      ReadStartRangeInternal(target, info, end);
-    }
-    else
-    {
-      StorageCache::Accessor accessorStartRange(*cache_);
-      if (!accessorStartRange.FetchStartRange(target, info.GetUuid(), info.GetContentType(), end))
-      {
-        // the start range is not in cache, let's check if the whole file is
-        StorageCache::Accessor accessorWhole(*cache_);
-        if (!accessorWhole.Fetch(target, info.GetUuid(), info.GetContentType()))
-        {
-          if (metrics_ != NULL)
-          {
-            metrics_->IncrementIntegerValue(METRICS_CACHE_MISS_COUNT, 1);
-          }
-
-          // if nothing is in the cache, let's read and cache only the start
-          ReadStartRangeInternal(target, info, end);
-          accessorStartRange.AddStartRange(info.GetUuid(), info.GetContentType(), target);
-        }
-        else
-        {
-          if (metrics_ != NULL)
-          {
-            metrics_->IncrementIntegerValue(METRICS_CACHE_HIT_COUNT, 1);
-          }
-
-          // we have read the whole file, check size and resize if needed
-          if (target.size() < end)
-          {
-            throw OrthancException(ErrorCode_CorruptedFile);
-          }
-
-          target.resize(end);
-        }
-      }
-      else if (metrics_ != NULL)
-      {
-        metrics_->IncrementIntegerValue(METRICS_CACHE_HIT_COUNT, 1);
-      }
-    }
-  }
-
-  void StorageAccessor::ReadStartRangeInternal(std::string& target,
-                                                const FileInfo& info,
-                                                uint64_t end /* exclusive */)
-  {
     std::unique_ptr<IMemoryBuffer> buffer;
 
     {
@@ -445,41 +298,14 @@
         info.GetCompressionType() != CompressionType_None)
     {
       // An uncompression is needed in this case
-      if (cache_ != NULL)
-      {
-        StorageCache::Accessor cacheAccessor(*cache_);
-
-        std::string content;
-        if (cacheAccessor.Fetch(content, info.GetUuid(), info.GetContentType()))
-        {
-          range.Extract(target, content);
-          return;
-        }
-      }
-
       std::string content;
       Read(content, info);
       range.Extract(target, content);
     }
     else
     {
-      // Access to the raw attachment is sufficient in this case
-      if (info.GetCompressionType() == CompressionType_None &&
-          cache_ != NULL)
-      {
-        // Check out whether the raw attachment is already present in the cache, by chance
-        StorageCache::Accessor cacheAccessor(*cache_);
-
-        std::string content;
-        if (cacheAccessor.Fetch(content, info.GetUuid(), info.GetContentType()))
-        {
-          range.Extract(target, content);
-          return;
-        }
-      }
-
       if (range.HasEnd() &&
-        range.GetEndInclusive() >= info.GetCompressedSize())
+          range.GetEndInclusive() >= info.GetCompressedSize())
       {
         throw OrthancException(ErrorCode_BadRange);
       }
--- a/OrthancFramework/Sources/FileStorage/StorageAccessor.h	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancFramework/Sources/FileStorage/StorageAccessor.h	Mon Jun 01 21:23:59 2026 +0200
@@ -55,7 +55,6 @@
 namespace Orthanc
 {
   class MetricsRegistry;
-  class StorageCache;
 
   /**
    * This class handles the compression/decompression of the raw files
@@ -67,9 +66,8 @@
   private:
     class MetricsTimer;
 
-    IPluginStorageArea&     area_;
-    StorageCache*     cache_;
-    MetricsRegistry*  metrics_;
+    IPluginStorageArea&  area_;
+    MetricsRegistry*     metrics_;
 
 #if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1
     void SetupSender(BufferHttpSender& sender,
@@ -81,13 +79,6 @@
     explicit StorageAccessor(IPluginStorageArea& area);
 
     StorageAccessor(IPluginStorageArea& area,
-                    StorageCache& cache);
-
-    StorageAccessor(IPluginStorageArea& area,
-                    MetricsRegistry& metrics);
-
-    StorageAccessor(IPluginStorageArea& area,
-                    StorageCache& cache,
                     MetricsRegistry& metrics);
 
     void Write(FileInfo& info /* out */,
@@ -149,17 +140,5 @@
                     const std::string& mime,
                     const std::string& contentFilename);
 #endif
-
-  private:
-    void ReadStartRangeInternal(std::string& target,
-                                const FileInfo& info,
-                                uint64_t end /* exclusive */);
-
-    void ReadWholeInternal(std::string& content,
-                           const FileInfo& info);
-
-    void ReadRawInternal(std::string& content,
-                         const FileInfo& info);
-
   };
 }
--- a/OrthancFramework/Sources/FileStorage/StorageCache.cpp	Mon Jun 01 20:57:58 2026 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/**
- * Orthanc - A Lightweight, RESTful DICOM Store
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2023 Osimis S.A., Belgium
- * Copyright (C) 2024-2026 Orthanc Team SRL, Belgium
- * Copyright (C) 2021-2026 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- **/
-
-
-#include "../PrecompiledHeaders.h"
-#include "StorageCache.h"
-
-#include "../Compatibility.h"
-#include "../Logging.h"
-#include "../OrthancException.h"
-
-#include <boost/lexical_cast.hpp>
-
-
-namespace Orthanc
-{
-  static std::string GetCacheKeyFullFile(const std::string& uuid,
-                                         FileContentType contentType)
-  {
-    return uuid + ":" + boost::lexical_cast<std::string>(contentType) + ":1";
-  }
-
-
-  static std::string GetCacheKeyStartRange(const std::string& uuid,
-                                           FileContentType contentType)
-  {
-    return uuid + ":" + boost::lexical_cast<std::string>(contentType) + ":0";
-  }
-
-
-  static std::string GetCacheKeyTranscodedInstance(const std::string& uuid,
-                                                   DicomTransferSyntax transferSyntax)
-  {
-    return uuid + ":ts:" + GetTransferSyntaxUid(transferSyntax);
-  }
-
-
-  void StorageCache::SetMaximumSize(size_t size)
-  {
-    cache_.SetMaximumSize(size);
-  }
-  
-
-  void StorageCache::Invalidate(const std::string& uuid,
-                                FileContentType contentType)
-  {
-    std::set<DicomTransferSyntax> transferSyntaxes;
-
-    {
-      boost::mutex::scoped_lock lock(subKeysMutex_);
-      transferSyntaxes = subKeysTransferSyntax_;
-    }
-
-    // invalidate full file, start range file and possible transcoded instances
-    const std::string keyFullFile = GetCacheKeyFullFile(uuid, contentType);
-    cache_.Invalidate(keyFullFile);
-
-    const std::string keyPartialFile = GetCacheKeyStartRange(uuid, contentType);
-    cache_.Invalidate(keyPartialFile);
-    
-    for (std::set<DicomTransferSyntax>::const_iterator it = transferSyntaxes.begin(); it != transferSyntaxes.end(); ++it)
-    {
-      const std::string keyTransferSyntax = GetCacheKeyTranscodedInstance(uuid, *it);
-      cache_.Invalidate(keyTransferSyntax);
-    }
-  }
-
-
-  StorageCache::Accessor::Accessor(StorageCache& cache)
-  : MemoryStringCache::Accessor(cache.cache_),
-    storageCache_(cache)
-  {
-  }
-
-  void StorageCache::Accessor::Add(const std::string& uuid, 
-                                   FileContentType contentType,
-                                   const std::string& value)
-  {
-
-    std::string key = GetCacheKeyFullFile(uuid, contentType);
-    MemoryStringCache::Accessor::Add(key, value);
-  }
-
-  void StorageCache::Accessor::AddStartRange(const std::string& uuid, 
-                                             FileContentType contentType,
-                                             const std::string& value)
-  {
-    const std::string key = GetCacheKeyStartRange(uuid, contentType);
-    MemoryStringCache::Accessor::Add(key, value);
-  }
-
-  void StorageCache::Accessor::Add(const std::string& uuid, 
-                                   FileContentType contentType,
-                                   const void* buffer,
-                                   size_t size)
-  {
-    const std::string key = GetCacheKeyFullFile(uuid, contentType);
-    MemoryStringCache::Accessor::Add(key, reinterpret_cast<const char*>(buffer), size);
-  }                                   
-
-  bool StorageCache::Accessor::Fetch(std::string& value, 
-                                     const std::string& uuid,
-                                     FileContentType contentType)
-  {
-    const std::string key = GetCacheKeyFullFile(uuid, contentType);
-    if (MemoryStringCache::Accessor::Fetch(value, key))
-    {
-      LOG(INFO) << "Read attachment \"" << uuid << "\" with content type "
-                << boost::lexical_cast<std::string>(contentType) << " from cache";
-      return true;
-    }
-    else
-    {
-      return false;
-    }
-  }
-
-  bool StorageCache::Accessor::FetchTranscodedInstance(std::string& value, 
-                                                       const std::string& uuid,
-                                                       DicomTransferSyntax targetSyntax)
-  {
-    const std::string key = GetCacheKeyTranscodedInstance(uuid, targetSyntax);
-    if (MemoryStringCache::Accessor::Fetch(value, key))
-    {
-      LOG(INFO) << "Read instance \"" << uuid << "\" transcoded to "
-                << GetTransferSyntaxUid(targetSyntax) << " from cache";
-      return true;
-    }
-    else
-    {
-      return false;
-    }
-  }
-
-  void StorageCache::Accessor::AddTranscodedInstance(const std::string& uuid,
-                                                     DicomTransferSyntax targetSyntax,
-                                                     const void* buffer,
-                                                     size_t size)
-  {
-    {
-      boost::mutex::scoped_lock lock(storageCache_.subKeysMutex_);
-      storageCache_.subKeysTransferSyntax_.insert(targetSyntax);
-    }
-
-    const std::string key = GetCacheKeyTranscodedInstance(uuid, targetSyntax);
-    MemoryStringCache::Accessor::Add(key, reinterpret_cast<const char*>(buffer), size);
-  }
-
-  bool StorageCache::Accessor::FetchStartRange(std::string& value, 
-                                               const std::string& uuid,
-                                               FileContentType contentType,
-                                               uint64_t end /* exclusive */)
-  {
-    const std::string keyPartialFile = GetCacheKeyStartRange(uuid, contentType);
-    if (MemoryStringCache::Accessor::Fetch(value, keyPartialFile) && value.size() >= end)
-    {
-      if (value.size() > end)  // the start range that has been cached is larger than the requested value
-      {
-        value.resize(end);
-      }
-
-      LOG(INFO) << "Read start of attachment \"" << uuid << "\" with content type "
-                << boost::lexical_cast<std::string>(contentType) << " from cache";
-      return true;
-    }
-
-    return false;
-  }
-
-
-  size_t StorageCache::GetCurrentSize() const
-  {
-    return cache_.GetCurrentSize();
-  }
-  
-  size_t StorageCache::GetNumberOfItems() const
-  {
-    return cache_.GetNumberOfItems();
-  }
-
-}
--- a/OrthancFramework/Sources/FileStorage/StorageCache.h	Mon Jun 01 20:57:58 2026 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/**
- * Orthanc - A Lightweight, RESTful DICOM Store
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2023 Osimis S.A., Belgium
- * Copyright (C) 2024-2026 Orthanc Team SRL, Belgium
- * Copyright (C) 2021-2026 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- **/
-
-
-#pragma once
-
-#include "../Cache/MemoryStringCache.h"
-
-#include "../Compatibility.h"  // For ORTHANC_OVERRIDE
-
-#include <boost/thread/mutex.hpp>
-#include <map>
-
-namespace Orthanc
-{
-   /**
-   *  Note: this class is thread safe
-   **/
-   class ORTHANC_PUBLIC StorageCache : public boost::noncopyable
-    {
-    public:
-
-      // The StorageCache is only accessible through this accessor.
-      // It will make sure that only one user will fill load data and fill
-      // the cache if multiple users try to access the same item at the same time.
-      // This scenario happens a lot when multiple workers from a viewer access 
-      // the same file.
-      class Accessor : public MemoryStringCache::Accessor
-      {
-        StorageCache& storageCache_;
-      public:
-        explicit Accessor(StorageCache& cache);
-
-        void Add(const std::string& uuid, 
-                 FileContentType contentType,
-                 const std::string& value);
-
-        void AddStartRange(const std::string& uuid, 
-                           FileContentType contentType,
-                           const std::string& value);
-
-        void Add(const std::string& uuid, 
-                 FileContentType contentType,
-                 const void* buffer,
-                 size_t size);
-
-        bool Fetch(std::string& value, 
-                   const std::string& uuid,
-                   FileContentType contentType);
-
-        bool FetchStartRange(std::string& value, 
-                             const std::string& uuid,
-                             FileContentType contentType,
-                             uint64_t end /* exclusive */);
-
-        bool FetchTranscodedInstance(std::string& value, 
-                                     const std::string& uuid,
-                                     DicomTransferSyntax targetSyntax);
-
-        void AddTranscodedInstance(const std::string& uuid,
-                                   DicomTransferSyntax targetSyntax,
-                                   const void* buffer,
-                                   size_t size);
-      };
-
-    private:
-      MemoryStringCache             cache_;
-      std::set<DicomTransferSyntax> subKeysTransferSyntax_;
-      boost::mutex                  subKeysMutex_;
-
-    public:
-      void SetMaximumSize(size_t size);
-
-      void Invalidate(const std::string& uuid,
-                      FileContentType contentType);
-
-      size_t GetCurrentSize() const;
-      
-      size_t GetNumberOfItems() const;
-
-    private:
-      void Add(const std::string& uuid, 
-               FileContentType contentType,
-               const std::string& value);
-
-      void AddStartRange(const std::string& uuid, 
-                         FileContentType contentType,
-                         const std::string& value);
-
-      void Add(const std::string& uuid, 
-               FileContentType contentType,
-               const void* buffer,
-               size_t size);
-
-      bool Fetch(std::string& value, 
-                 const std::string& uuid,
-                 FileContentType contentType);
-
-      bool FetchStartRange(std::string& value, 
-                           const std::string& uuid,
-                           FileContentType contentType,
-                           uint64_t end /* exclusive */);
-
-    };
-}
--- a/OrthancFramework/UnitTestsSources/FileStorageTests.cpp	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancFramework/UnitTestsSources/FileStorageTests.cpp	Mon Jun 01 21:23:59 2026 +0200
@@ -32,7 +32,6 @@
 #include "../Sources/FileStorage/FilesystemStorage.h"
 #include "../Sources/FileStorage/PluginStorageAreaAdapter.h"
 #include "../Sources/FileStorage/StorageAccessor.h"
-#include "../Sources/FileStorage/StorageCache.h"
 #include "../Sources/Logging.h"
 #include "../Sources/OrthancException.h"
 #include "../Sources/Toolbox.h"
@@ -196,8 +195,7 @@
 TEST(StorageAccessor, NoCompression)
 {
   PluginStorageAreaAdapter s(new FilesystemStorage("UnitTestsStorage"));
-  StorageCache cache;
-  StorageAccessor accessor(s, cache);
+  StorageAccessor accessor(s);
 
   const std::string data = "Hello world";
   FileInfo info;
@@ -219,8 +217,7 @@
 TEST(StorageAccessor, Compression)
 {
   PluginStorageAreaAdapter s(new FilesystemStorage("UnitTestsStorage"));
-  StorageCache cache;
-  StorageAccessor accessor(s, cache);
+  StorageAccessor accessor(s);
 
   const std::string data = "Hello world";
   FileInfo info;
@@ -241,8 +238,7 @@
 TEST(StorageAccessor, Mix)
 {
   PluginStorageAreaAdapter s(new FilesystemStorage("UnitTestsStorage"));
-  StorageCache cache;
-  StorageAccessor accessor(s, cache);
+  StorageAccessor accessor(s);
 
   const std::string compressedData = "Hello";
   const std::string uncompressedData = "HelloWorld";
--- a/OrthancServer/Sources/ServerToolbox.cpp	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancServer/Sources/ServerToolbox.cpp	Mon Jun 01 21:23:59 2026 +0200
@@ -26,7 +26,6 @@
 
 #include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h"
 #include "../../OrthancFramework/Sources/FileStorage/StorageAccessor.h"
-#include "../../OrthancFramework/Sources/FileStorage/StorageCache.h"
 #include "../../OrthancFramework/Sources/Logging.h"
 #include "../../OrthancFramework/Sources/OrthancException.h"
 #include "Database/IDatabaseWrapper.h"
--- a/OrthancServer/UnitTestsSources/SizeOfTests.cpp	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancServer/UnitTestsSources/SizeOfTests.cpp	Mon Jun 01 21:23:59 2026 +0200
@@ -101,7 +101,6 @@
 #include "../../OrthancFramework/Sources/FileStorage/IStorageArea.h"
 #include "../../OrthancFramework/Sources/FileStorage/MemoryStorageArea.h"
 #include "../../OrthancFramework/Sources/FileStorage/StorageAccessor.h"
-#include "../../OrthancFramework/Sources/FileStorage/StorageCache.h"
 #include "../../OrthancFramework/Sources/HttpClient.h"
 #include "../../OrthancFramework/Sources/HttpServer/BufferHttpSender.h"
 #include "../../OrthancFramework/Sources/HttpServer/FilesystemHttpHandler.h"
--- a/OrthancServer/UnitTestsSources/SizeOfTests.impl.h	Mon Jun 01 20:57:58 2026 +0200
+++ b/OrthancServer/UnitTestsSources/SizeOfTests.impl.h	Mon Jun 01 21:23:59 2026 +0200
@@ -105,7 +105,6 @@
   printf("sizeof(::Orthanc::SharedLibrary) == %d\n", static_cast<int>(sizeof(::Orthanc::SharedLibrary)));
   printf("sizeof(::Orthanc::SharedMessageQueue) == %d\n", static_cast<int>(sizeof(::Orthanc::SharedMessageQueue)));
   printf("sizeof(::Orthanc::StorageAccessor) == %d\n", static_cast<int>(sizeof(::Orthanc::StorageAccessor)));
-  printf("sizeof(::Orthanc::StorageCache) == %d\n", static_cast<int>(sizeof(::Orthanc::StorageCache)));
   printf("sizeof(::Orthanc::StreamBlockReader) == %d\n", static_cast<int>(sizeof(::Orthanc::StreamBlockReader)));
   printf("sizeof(::Orthanc::StringMatcher) == %d\n", static_cast<int>(sizeof(::Orthanc::StringMatcher)));
   printf("sizeof(::Orthanc::StringOperationValue) == %d\n", static_cast<int>(sizeof(::Orthanc::StringOperationValue)));