asp.net core 使用redis缓存笔记

安装nuget包地址:https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis

官方文档:https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-5.0

appsettings.json根节点:

注入redis

使用:

 

posted @ 2021-05-27 10:09  屌丝大叔的笔记  阅读(168)  评论(0编辑  收藏  举报