CategoriesCache ---------------------------------------------------------------------------------
| 16 | |
| 17 | // CategoriesCache --------------------------------------------------------------------------------- |
| 18 | CBV CategoriesCache::Get(MwmContext const & context) |
| 19 | { |
| 20 | auto const id = context.m_handle.GetId(); |
| 21 | auto const it = m_cache.find(id); |
| 22 | if (it != m_cache.cend()) |
| 23 | return it->second; |
| 24 | |
| 25 | auto cbv = Load(context); |
| 26 | m_cache[id] = cbv; |
| 27 | return cbv; |
| 28 | } |
| 29 | |
| 30 | CBV CategoriesCache::Load(MwmContext const & context) const |
| 31 | { |