Esempio n. 1
0
        public async Task <IActionResult> Index(CancellationToken cancellation)
        {
            var helloKey = new CacheKeySettings {
                Key = "hello_message", Expiry = TimeSpan.FromHours(1)
            };

            ViewBag.Message = await _cache.GetAsync <string>(helloKey, () => GetHelloAsync(), cancellation);

            return(View());
        }