private async Task <T> Get <T>(string key) { var json = string.Empty; if (await _distributedCache.ExistsAsync(key)) { json = await _distributedCache.GetCustomValueAsync <string>(key); } return(JsonConvert.DeserializeObject <T>(json)); }