| 19 | std::make_shared<InMemoryPersistentCache>(); |
| 20 | |
| 21 | std::shared_ptr<PersistentCache> PersistentCache::set_impl( |
| 22 | std::shared_ptr<PersistentCache> impl) { |
| 23 | mgb_assert(impl); |
| 24 | merge_old_cache(impl); |
| 25 | sm_impl.swap(impl); |
| 26 | return impl; |
| 27 | } |
| 28 | |
| 29 | void PersistentCache::merge_old_cache(std::shared_ptr<PersistentCache> impl) { |
| 30 | MGB_LOCK_GUARD(PersistentCache::inst().m_mtx); |