# HG changeset patch # User Alain Mazy # Date 1758202528 -7200 # Node ID 72ae47e6bc4e73cac0a564b1f4c04d3248d69081 # Parent 7736dc6c1e49ca28e0756ce05022b88cf8e562c5 fix MaximumStorageCacheSize=0 diff -r 7736dc6c1e49 -r 72ae47e6bc4e NEWS --- a/NEWS Thu Sep 18 15:17:25 2025 +0200 +++ b/NEWS Thu Sep 18 15:35:28 2025 +0200 @@ -33,6 +33,9 @@ - Using a "TemporaryDirectory" to save zip file or to export DICOMDIR - The "SslCertificate" and other related configurations * Fix: DicomGetScu jobs are now saved in DB. +* Fix: When the configuration option "MaximumStorageCacheSize" was set to 0, the default value (128) + was actually applied. From now on, a value of 0 really means that the storage cache is disabled. + Version 1.12.9 (2025-08-11) =========================== diff -r 7736dc6c1e49 -r 72ae47e6bc4e OrthancFramework/Sources/Cache/MemoryStringCache.cpp --- a/OrthancFramework/Sources/Cache/MemoryStringCache.cpp Thu Sep 18 15:17:25 2025 +0200 +++ b/OrthancFramework/Sources/Cache/MemoryStringCache.cpp Thu Sep 18 15:35:28 2025 +0200 @@ -131,11 +131,6 @@ void MemoryStringCache::SetMaximumSize(size_t size) { - if (size == 0) - { - throw OrthancException(ErrorCode_ParameterOutOfRange); - } - // // Make sure no accessor is currently open (as its data may be // // removed if recycling is needed) // WriterLock contentLock(contentMutex_); diff -r 7736dc6c1e49 -r 72ae47e6bc4e OrthancFramework/UnitTestsSources/MemoryCacheTests.cpp --- a/OrthancFramework/UnitTestsSources/MemoryCacheTests.cpp Thu Sep 18 15:17:25 2025 +0200 +++ b/OrthancFramework/UnitTestsSources/MemoryCacheTests.cpp Thu Sep 18 15:35:28 2025 +0200 @@ -319,7 +319,7 @@ TEST(MemoryStringCache, Basic) { Orthanc::MemoryStringCache c; - ASSERT_THROW(c.SetMaximumSize(0), Orthanc::OrthancException); + ASSERT_NO_THROW(c.SetMaximumSize(0)); // changed in 1.12.10, setting the MaximumSize to zero is a way to disable a cache c.SetMaximumSize(3);