Exemplo n.º 1
0
        public static async Task <T> GetJsonAsync <T>(this IDistributedCache distributedCache, string key, CancellationToken token = default(CancellationToken)) where T : class
        {
            var value = await distributedCache.GetStringAsync(key, token);

            return(ObjectExtensions.FromJson <T>(value));
        }