您尚未登录 - 登录 - 注册
Time: 2008-08-29 15:45

只看楼主 楼主

理改模板内容,缓存什么时候更新呀。

我改了半天还是和没改的一样,这是为什么呢?
yuesha的签名
MAX测试YueSha.com

IP:59.*.*.*     TOP

Time: 2008-08-29 15:45

只看该用户 沙发

Re:理改模板内容,缓存什么时候更新呀。

是不是在后台设置个清理模板缓存的功能呀
yuesha的签名
MAX测试YueSha.com

IP:59.*.*.*     TOP

Time: 2008-08-29 15:53

只看该用户 板凳

Re:理改模板内容,缓存什么时候更新呀。

a 包含B,修改b,那么就要先修改A就会使B生效,
包含就是有一个<!--#include file="_xxxhtml"--> 例子:如default.html 最底下有一句<!--#include file="_foot.html"-->,那么修改_foot.html的内容要生效,必须也修改一下default.html,刷新就可以了,等显示了。在把DEFAULT.HTML改回来。
bbsmax技术的签名
nginx

IP:125.*.*.*     TOP

Time: 2008-08-29 16:36

只看该用户 地板

Re:理改模板内容,缓存什么时候更新呀。

缓存依赖项没做好,

提供解决方案:
代码 复制 - 运行
/// <summary>
/// 文件缓存依赖项
/// </summary>
/// <param name="virtualPath"></param>
/// <param name="virtualPathDependencies"></param>
/// <param name="utcStart"></param>
/// <returns></returns>
public override System.Web.Caching.CacheDependency GetCacheDependency(string virtualPath, System.Collections.IEnumerable virtualPathDependencies, DateTime utcStart)
{
if (virtualPathDependencies == null)
{
return null ;
}
System.Collections.Specialized.StringCollection fullPathDependencies = null;
//获得当前所有依赖
foreach (string virtualDependency in virtualPathDependencies)
{
if (fullPathDependencies == null)
fullPathDependencies = new System.Collections.Specialized.StringCollection();

string fileName = virtualDependency.Substring(CurrentContext.ThemeVirtualPath.Length + 1).Replace("/","\\");


fullPathDependencies.Add(CurrentContext.ThemePhysicalPath + "\\" + fileName);
}

string[] fullPathDependenciesArray = new string[fullPathDependencies.Count];
fullPathDependencies.CopyTo(fullPathDependenciesArray, 0);

return new CacheDependency(fullPathDependenciesArray);
}
帅帅的签名
未将对象引用设置到对象的实例

IP:218.*.*.*     TOP

Time: 2008-08-29 17:10

只看该用户 #4

Re:理改模板内容,缓存什么时候更新呀。

新版本什么时候上线呀,准备好了要上线哦。
yuesha的签名
MAX测试YueSha.com

IP:59.*.*.*     TOP