我应该将urlrecord缓存放在ASP.NET核心中? [英] Where I should put the urlrecord cache in ASP.NET core?
本文介绍了我应该将urlrecord缓存放在ASP.NET核心中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想缓存存储Slugs的UrlRecord列表。
有人可以给我任何建议吗?
谢谢。
我尝试了什么:
第一次,我在一个自定义中间件类中缓存,但是它调用了每个httpRequest。
I want to cache a UrlRecord list which store the Slugs.
Can someone give me any suggest?
Thank you.
What I have tried:
At first time, i am cache in a custom middleware class, but it called for every httpRequest.
推荐答案
这里有关于ASP.NET核心应用程序缓存的官方文档:内存缓存 - ASP.NET文档 [ ^ ]
There's an official docs regarding caching for ASP.NET Core apps here: In Memory Caching — ASP.NET documentation[^]
这篇关于我应该将urlrecord缓存放在ASP.NET核心中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文