Mercurial > hg > orthanc-webviewer
comparison Plugin/Cache/CacheManager.cpp @ 188:a11bf02917e9
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Apr 2018 15:19:24 +0200 |
parents | 81f16c5667ba |
children | 993dd140bd30 |
comparison
equal
deleted
inserted
replaced
187:4b9da483ae4d | 188:a11bf02917e9 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #include "CacheManager.h" | 22 #include "CacheManager.h" |
23 | 23 |
24 #include "../../Orthanc/Core/SystemToolbox.h" | 24 #include "../../Orthanc/Core/Toolbox.h" |
25 #include "../../Orthanc/Core/SQLite/Transaction.h" | 25 #include "../../Orthanc/Core/SQLite/Transaction.h" |
26 | 26 |
27 #include <boost/lexical_cast.hpp> | 27 #include <boost/lexical_cast.hpp> |
28 | 28 |
29 | 29 |
352 bundle.Add(content.size()); | 352 bundle.Add(content.size()); |
353 MakeRoom(bundle, toRemove, bundleIndex, quota); | 353 MakeRoom(bundle, toRemove, bundleIndex, quota); |
354 | 354 |
355 // Store the cached content on the disk | 355 // Store the cached content on the disk |
356 const char* data = content.size() ? &content[0] : NULL; | 356 const char* data = content.size() ? &content[0] : NULL; |
357 std::string uuid = SystemToolbox::GenerateUuid(); | 357 std::string uuid = Toolbox::GenerateUuid(); |
358 pimpl_->storage_.Create(uuid, data, content.size(), Orthanc::FileContentType_Unknown); | 358 pimpl_->storage_.Create(uuid, data, content.size(), Orthanc::FileContentType_Unknown); |
359 | 359 |
360 bool ok = true; | 360 bool ok = true; |
361 | 361 |
362 // Remove the previous cached value. This might happen if the same | 362 // Remove the previous cached value. This might happen if the same |