Umbraco缓存 [英] Umbraco caching

查看:104
本文介绍了Umbraco缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在宏缓存方面遇到了真正的问题.我已将缓存周期设置为0,但是在我强制应用程序进行回收之前,返回内容树中其他项目列表的dropdownlist不会更新.触摸web.config文件.

I'm having real problem with caching in a macro. I've set the cache period to 0 but still a dropdownlist that returns a list of other items in the content tree won't update until I force the application to recycle e.g. touch the web.config file.

宏使用umbraco.content.Instance.XmlContent.SelectSingleNode选择父节点,然后遍历子节点并将其添加到下拉列表中.

The Macro uses umbraco.content.Instance.XmlContent.SelectSingleNode to select a parent node and then loops through the children and adds these to the dropdownlist.

当我向该节点添加新子节点时,即使再次发布整个网站,该子节点也不会出现在下拉列表中.

When I add a new child to this node it doesn't appear in the dropdownlist even if I publish the entire website again.

我不确定此缓存在哪里进行.谁能指出我正确的方向?

I'm not sure where this caching is taking place. Can anyone point me in the right direction?

推荐答案

您可以通过为特定文件(例如css,.js)提供版本,或随时随地更改web.config文件中的内容来轻松解决缓存问题.部署.

You can easily solve your caching problem by providing version to a particular file like css, .js or change something into the web.config file whenever you will go for the deployment.

例如:如果我们具有的script.js文件然后更改文件的版本的script.js 123

For example : If we have Script.js file then change version of file for Script.js ?123.

当我们改变一个文件的版本,那么服务器会从该文件中的最新代码.

When we changed the version of a file then server will get the latest code from that file.

让我知道您是否还有任何疑问.

Let me know if you have any further query.

谢谢

这篇关于Umbraco缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆