diff Framework/Toolbox/ParsedDicomFileCache.h @ 1140:6333e6f7248e broker

fix cache
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Nov 2019 16:53:15 +0100
parents 42581a6182c8
children
line wrap: on
line diff
--- a/Framework/Toolbox/ParsedDicomFileCache.h	Thu Nov 07 09:16:31 2019 +0100
+++ b/Framework/Toolbox/ParsedDicomFileCache.h	Thu Nov 07 16:53:15 2019 +0100
@@ -38,6 +38,11 @@
     {
       cache_.SetMaximumSize(size);
     }
+
+    void Invalidate(const std::string& path)
+    {
+      cache_.Invalidate(path);
+    }
     
     void Acquire(const std::string& path,
                  Orthanc::ParsedDicomFile* dicom,
@@ -47,9 +52,8 @@
     class Reader : public boost::noncopyable
     {
     private:
-      Orthanc::MemoryObjectCache::Reader reader_;
-      std::auto_ptr<boost::mutex::scoped_lock>  lock_;
-      Item*                         item_;
+      Orthanc::MemoryObjectCache::Accessor accessor_;
+      Item*                                item_;
 
     public:
       Reader(ParsedDicomFileCache& cache,