public async Task <string> GetById(long id) { if (_firstLevelCache.ContainsKey(id)) { return(_firstLevelCache[id]); } string key = string.Format("/dict/reftype/{0}", id); var value = await _cacheProvider.Get(key, () => GetRefTypeName(id)); _firstLevelCache[id] = value; return(value); }
public async Task <string> GetById(long id) { string key = string.Format("/dict/CharacterName/{0}", id); return(await _cacheProvider.Get(key, () => GetCharacterName(id))); }