简体   繁体   English

缓存模块/ Orchard CMS中的缓存

[英]Caching module / Caching in Orchard CMS

I am using Orchard 1.7.3 and there is certain code in my project that I don't want to cache. 我正在使用Orchard 1.7.3,项目中有某些我不想缓存的代码。 Is there any way to use the ICacheManager in orchard to exclude certain part of my code from caching? 有什么方法可以在果园中使用ICacheManager将我的代码的某些部分从缓存中排除吗?

Or is there some setting in the Orchard's Caching module that will exclude certain content from caching? 还是Orchard的“缓存”模块中有一些设置可以将某些内容排除在缓存之外?

Thanks. 谢谢。

Yes, you can decorate controller actions with the [OutputCache(Duration = 0)] attribute. 是的,您可以使用[OutputCache(Duration = 0)]属性装饰控制器动作。

There is also a settings page for the output cache where you can specify a list of excluded URLs. 对于输出缓存,还有一个设置页面,您可以在其中指定排除URL的列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM