I currently have a control that called MyGridview that inherits Gridview. It has a paging template within it for customized paging options, and I'm at the point where I want to cache the initial datasource for better performance.
I haven't done this in a long time, so perhaps there is a different solution these days with the newer frameworks. Before, I simply used a Cache object that was named whatever the gridview was named. I couldn't use the same gridview name through the application though.
Is there a best way to have a cache object, or some other object like a session within the control to store those unique datasets for paging and sorting?