| 194 | } |
| 195 | |
| 196 | void StorageCache::retrieve(sds key, IStorage::callbackSingle fn) const |
| 197 | { |
| 198 | std::unique_lock<fastlock> ul(m_lock); |
| 199 | if (m_pdict != nullptr) |
| 200 | { |
| 201 | uint64_t hash = dictSdsHash(key); |
| 202 | dictEntry *de = dictFind(m_pdict, reinterpret_cast<void*>(hash)); |
| 203 | |
| 204 | if (de == nullptr) |
| 205 | return; // Not found |
| 206 | } |
| 207 | ul.unlock(); |
| 208 | m_spstorage->retrieve(key, sdslen(key), fn); |
| 209 | } |
| 210 | |
| 211 | size_t StorageCache::count() const |
| 212 | { |
no test coverage detected