我正在关注 Chris Pietschmann 的ASP.NET MVC 主题解决方案。
我注意到的一件事是,在后续请求中没有从 ViewLocationCache 中检索视图名称。我正在使用 ASP.NET MVC 2.0 RC
当执行以下代码时:
this.ViewLocationCache.InsertViewLocation(controllerContext.HttpContext, cacheKey, virtualPath);
我将鼠标悬停在 this.ViewLocationCache 上它只返回 {System.Web.Mvc.NullViewLocationCache} - 暗示没有添加任何内容?