| 41 | } |
| 42 | |
| 43 | void StorageCache::clearAsync() |
| 44 | { |
| 45 | std::unique_lock<fastlock> ul(m_lock); |
| 46 | if (count() == 0) |
| 47 | return; |
| 48 | if (m_pdict != nullptr) { |
| 49 | dict *dSav = m_pdict; |
| 50 | m_pdict = dictCreate(&dbStorageCacheType, nullptr); |
| 51 | g_pserver->asyncworkqueue->AddWorkFunction([dSav]{ |
| 52 | dictEmpty(dSav, nullptr); |
| 53 | }); |
| 54 | } |
| 55 | m_spstorage->clear(); |
| 56 | m_collisionCount = 0; |
| 57 | } |
| 58 | |
| 59 | void StorageCache::cacheKey(sds key) |
| 60 | { |
no test coverage detected