Mercurial > hg > orthanc
comparison Core/Cache/MemoryCache.cpp @ 2507:99116ed6f38c
invalidate DicomCache when deleting instance
author | amazy |
---|---|
date | Mon, 26 Mar 2018 18:31:40 +0200 |
parents | 878b59270859 |
children | 7caf01aa4d7b |
comparison
equal
deleted
inserted
replaced
2506:51b91ead6c38 | 2507:99116ed6f38c |
---|---|
76 provider_(provider), | 76 provider_(provider), |
77 cacheSize_(cacheSize) | 77 cacheSize_(cacheSize) |
78 { | 78 { |
79 } | 79 } |
80 | 80 |
81 void MemoryCache::Invalidate(const std::string& id) | |
82 { | |
83 if (index_.Contains(id)) | |
84 { | |
85 VLOG(1) << "Invalidating a cache page"; | |
86 index_.Invalidate(id); | |
87 } | |
88 } | |
89 | |
81 MemoryCache::~MemoryCache() | 90 MemoryCache::~MemoryCache() |
82 { | 91 { |
83 while (!index_.IsEmpty()) | 92 while (!index_.IsEmpty()) |
84 { | 93 { |
85 Page* element = NULL; | 94 Page* element = NULL; |