ASP.NET Core Distributed Cache usage
| public HomeController(IDistributedCache cache) { | |
| this.Cache = cache; | |
| } | |
| public IDistributedCache Cache { get; private set; } | |
| public IActionResult Index() { | |
| ViewBag.CachedValue = Cache.Get("myCacheKey"); | |
| return View(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment