Mercurial > hg > orthanc
comparison Core/Cache/SharedArchive.cpp @ 2512:4dcafa8d6633
SystemToolbox::GenerateUuid moved to Toolbox::GenerateUuid
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Mar 2018 15:20:50 +0200 |
parents | 878b59270859 |
children | cb5d75143da0 |
comparison
equal
deleted
inserted
replaced
2511:8a0d3044ef53 | 2512:4dcafa8d6633 |
---|---|
32 | 32 |
33 | 33 |
34 #include "../PrecompiledHeaders.h" | 34 #include "../PrecompiledHeaders.h" |
35 #include "SharedArchive.h" | 35 #include "SharedArchive.h" |
36 | 36 |
37 #include "../SystemToolbox.h" | 37 #include "../Toolbox.h" |
38 | 38 |
39 | 39 |
40 namespace Orthanc | 40 namespace Orthanc |
41 { | 41 { |
42 void SharedArchive::RemoveInternal(const std::string& id) | 42 void SharedArchive::RemoveInternal(const std::string& id) |
98 // The quota has been reached, remove the oldest element | 98 // The quota has been reached, remove the oldest element |
99 std::string oldest = lru_.RemoveOldest(); | 99 std::string oldest = lru_.RemoveOldest(); |
100 RemoveInternal(oldest); | 100 RemoveInternal(oldest); |
101 } | 101 } |
102 | 102 |
103 std::string id = SystemToolbox::GenerateUuid(); | 103 std::string id = Toolbox::GenerateUuid(); |
104 RemoveInternal(id); // Should never be useful because of UUID | 104 RemoveInternal(id); // Should never be useful because of UUID |
105 archive_[id] = obj; | 105 archive_[id] = obj; |
106 lru_.Add(id); | 106 lru_.Add(id); |
107 | 107 |
108 return id; | 108 return id; |