comparison Core/Cache/MemoryStringCache.cpp @ 3563:4812825e69fc

accessor to the cache can now require to be unique
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Nov 2019 15:35:18 +0100
parents 4d809b2e1141
children 94f4a18a79cc
comparison
equal deleted inserted replaced
3562:f47149cdc048 3563:4812825e69fc
67 67
68 68
69 bool MemoryStringCache::Fetch(std::string& value, 69 bool MemoryStringCache::Fetch(std::string& value,
70 const std::string& key) 70 const std::string& key)
71 { 71 {
72 MemoryObjectCache::Reader reader(cache_, key); 72 MemoryObjectCache::Accessor reader(cache_, key, false /* multiple readers are allowed */);
73 73
74 if (reader.IsValid()) 74 if (reader.IsValid())
75 { 75 {
76 value = dynamic_cast<StringValue&>(reader.GetValue()).GetContent(); 76 value = dynamic_cast<StringValue&>(reader.GetValue()).GetContent();
77 return true; 77 return true;