Skip to content

Instantly share code, notes, and snippets.

@mattbrailsford
Created April 30, 2013 08:19
Show Gist options
  • Save mattbrailsford/5487346 to your computer and use it in GitHub Desktop.
Save mattbrailsford/5487346 to your computer and use it in GitHub Desktop.
@{
var myModel = new MyModelObj();
myModel.SomeProp = "Hello";
}
@Html.CachedPartial("MyPartialName", myModel, 3600)
@{
myModel.SomeProp = "World";
}
@Html.CachedPartial("MyPartialName", myModel, 3600)
@netaddicts
Copy link

Ok, get the point in your example, and assume the same goes for data passed in as a ViewDataDictionary object, so makes this example rather useless if you need more control over your caching (ie based on querystrings, cookie values) as we could in v4 (standard macro's)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment