# HG changeset patch # User Sebastien Jodogne # Date 1780429979 -7200 # Node ID ff30e25e081e74c99eb13f2744217b1e4c0a587c # Parent 689d73b259f1f161de7ad5f55d0a83c4dbe57397 comment diff -r 689d73b259f1 -r ff30e25e081e OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Tue Jun 02 18:31:10 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Tue Jun 02 21:52:59 2026 +0200 @@ -843,6 +843,14 @@ FileContentType type, const std::string& customData) { + /** + * Note that it is not necessary to explicitly invalidate the + * cache after the removal of an attachment, as each attachment + * receives a unique UUID in ServerContext::CreateFile(), even if + * the DICOM instance is overwritten. The key of the removed + * attachment will thus never be seen again as new files are added. + **/ + MetricsRegistry::Timer timer(*metricsRegistry_, METRICS_STORAGE_AREA_REMOVE_DURATION); area_.Remove(fileUuid, type, customData); }