Mercurial > hg > orthanc-wsi
changeset 70:f2c179294382
improvement
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Nov 2016 21:57:47 +0100 |
parents | d529d9ce3c7e |
children | 326959045d12 |
files | Framework/Inputs/DicomPyramidInstance.cpp |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Inputs/DicomPyramidInstance.cpp Fri Nov 25 21:56:07 2016 +0100 +++ b/Framework/Inputs/DicomPyramidInstance.cpp Fri Nov 25 21:57:47 2016 +0100 @@ -213,16 +213,20 @@ } catch (Orthanc::OrthancException&) { + // No cached information yet } } - // No cached information, compute it from scratch + // Compute information about this instance from scratch Load(orthanc, instanceId); - // Serialize the computed information and cache it as a metadata - std::string serialized, tmp; - Serialize(serialized); - orthanc.RestApiPut(tmp, "/instances/" + instanceId + "/metadata/" + SERIALIZED_METADATA, serialized); + if (useCache) + { + // Serialize the computed information and cache it as a metadata + std::string serialized, tmp; + Serialize(serialized); + orthanc.RestApiPut(tmp, "/instances/" + instanceId + "/metadata/" + SERIALIZED_METADATA, serialized); + } }