Mercurial > hg > orthanc-authorization
comparison Plugin/ResourceHierarchyCache.cpp @ 43:14594077ad3a 0.2.4
Release 0.2.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Dec 2020 14:50:14 +0100 |
parents | 79d871605ffd |
children | 914b8113fd46 |
comparison
equal
deleted
inserted
replaced
42:5ec8c70cbcf6 | 43:14594077ad3a |
---|---|
24 #include <boost/lexical_cast.hpp> | 24 #include <boost/lexical_cast.hpp> |
25 | 25 |
26 namespace OrthancPlugins | 26 namespace OrthancPlugins |
27 { | 27 { |
28 std::string ResourceHierarchyCache::ComputeKey(Orthanc::ResourceType level, | 28 std::string ResourceHierarchyCache::ComputeKey(Orthanc::ResourceType level, |
29 const std::string identifier) const | 29 const std::string& identifier) const |
30 { | 30 { |
31 return boost::lexical_cast<std::string>(level) + "|" + identifier; | 31 return boost::lexical_cast<std::string>(level) + "|" + identifier; |
32 } | 32 } |
33 | 33 |
34 | 34 |
181 if (dicomToOrthanc_->Retrieve(target, key)) | 181 if (dicomToOrthanc_->Retrieve(target, key)) |
182 { | 182 { |
183 return true; | 183 return true; |
184 } | 184 } |
185 | 185 |
186 OrthancResource resource(level, dicomUid); | |
187 | |
188 if (OrthancResource::LookupOrthancId(target, level, dicomUid)) | 186 if (OrthancResource::LookupOrthancId(target, level, dicomUid)) |
189 { | 187 { |
190 dicomToOrthanc_->Store(key, target, 0 /* no expiration */); | 188 dicomToOrthanc_->Store(key, target, 0 /* no expiration */); |
191 return true; | 189 return true; |
192 } | 190 } |