Virtual Path Provider disable caching?

后端 未结 5 2063
鱼传尺愫
鱼传尺愫 2020-12-31 18:18

I have a virtual path provider. Problem is its caching my files. Whenever I manually edit one of the aspx files it references the VPP doesn\'t pull in the new file, it conti

5条回答
  •  清酒与你
    2020-12-31 18:54

    public override CacheDependency GetCacheDependency(string virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
    {
       return IsVirtualPath(virtualPath) ? new CacheDependency(HttpContext.Current.Server.MapPath("~/Resource.xml")) 
                                         : Previous.GetCacheDependency(virtualPath, virtualPathDependencies, utcStart);
    }
    

提交回复
热议问题