Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
1139:8d2f1b25593c | 1140:6333e6f7248e |
---|---|
36 public: | 36 public: |
37 ParsedDicomFileCache(size_t size) | 37 ParsedDicomFileCache(size_t size) |
38 { | 38 { |
39 cache_.SetMaximumSize(size); | 39 cache_.SetMaximumSize(size); |
40 } | 40 } |
41 | |
42 void Invalidate(const std::string& path) | |
43 { | |
44 cache_.Invalidate(path); | |
45 } | |
41 | 46 |
42 void Acquire(const std::string& path, | 47 void Acquire(const std::string& path, |
43 Orthanc::ParsedDicomFile* dicom, | 48 Orthanc::ParsedDicomFile* dicom, |
44 size_t fileSize, | 49 size_t fileSize, |
45 bool hasPixelData); | 50 bool hasPixelData); |
46 | 51 |
47 class Reader : public boost::noncopyable | 52 class Reader : public boost::noncopyable |
48 { | 53 { |
49 private: | 54 private: |
50 Orthanc::MemoryObjectCache::Reader reader_; | 55 Orthanc::MemoryObjectCache::Accessor accessor_; |
51 std::auto_ptr<boost::mutex::scoped_lock> lock_; | 56 Item* item_; |
52 Item* item_; | |
53 | 57 |
54 public: | 58 public: |
55 Reader(ParsedDicomFileCache& cache, | 59 Reader(ParsedDicomFileCache& cache, |
56 const std::string& path); | 60 const std::string& path); |
57 | 61 |