ASP.NET MVC ViewEngine ViewLocationCache.GetViewLocation returns null -


I'm following Chris Pisman.

One thing I noticed is that the name of the scene is not retrieved from the ViewLocationCache on subsequent requests I asp.net MVC 2.0 RC

The following code is executed when:

  this.ViewLocationCache.InsertViewLocation (controllerContext.HttpContext, cache, virtual path);  

And I have to walk on it. See the place it returns now {System.web.mvc.NullViewLocationCache} - Suggest that nothing was added?

view location cache works only in release mode by default (settings & lt; compilation debug = "false" & gt; web.config ).

To enable view location cache in debug mode:
WebFormViewEngine in a custom view engine, like the creator of your ViewEngine ViewLocationCache Set:

  Public MyCustomViewEngine () {ViewLocationCache = New DefaultViewLocationCache (); }  

If you want, you can also override the default cache time bar value.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -