public T this[string key] { get { var task = cache.Get(key); task.Wait(); return(JsonConvert.DeserializeObject <T>(Encoding.UTF8.GetString(task.Result))); } set { var task = cache.Insert(key, Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(value))); task.Wait(); } }