ViewState Caching
This is a great idea, but it's implemented for SharePoint. Wonder if there is a solution for regular asp.net pages, which does the same, caches viewstates.
View state is used automatically by the ASP.NET page framework to persist information that must be preserved between postbacks. This information includes any non-default values of controls. You can also use view state to store application data that is specific to a page.
Caching enables you to store data in memory for rapid access. When the data is accessed again, applications can get the data from the cache instead of retrieving it from the original source. This can improve performance and scalability.
Session state caching is useful for storing data associated with an HTTP session. Storing this data in a cache allows it to be retrieved quickly and persisted across log-ins.
ViewState and ControlState are both mechanisms used in ASP.NET for maintaining data across postbacks. Both are preserved in a hidden field known as _VIEWSTATE. The differences are: 1)ViewState can be disabled while the Control State cannot be disabled.
It's actually quite simple! You just need to override these two methods on your page:
SavePageStateToPersistentMedium()
LoadPageStateFromPersistenceMedium()
In there, you can get the ViewState object tree, serialize it however you want and store it wherever you want (Session, SQL, etc), and instead of returning the entire serialized blob to the browser, just return a unique ID you can use to look it up again next time around.
The idea is covered in painstaking detail here: http://msdn.microsoft.com/en-us/library/ms972976.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With