Created
April 30, 2013 08:19
-
-
Save mattbrailsford/5487346 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
var myModel = new MyModelObj(); | |
myModel.SomeProp = "Hello"; | |
} | |
@Html.CachedPartial("MyPartialName", myModel, 3600) | |
@{ | |
myModel.SomeProp = "World"; | |
} | |
@Html.CachedPartial("MyPartialName", myModel, 3600) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)