So I'd love to move to using the built-in data caching of the ObjectDataSource, but I'm hitting a snag.
If I use basic types for my session parameter, changing the value triggers a cache refresh.
Session["myValue"] = 5; //data loaded from the database
Session["myValue"] = 15; //data loaded from the database
If I use custom types for my session parameter, changing the value does not trigger a cache refresh.
Session["myValue"] = new MyCustomObject(5); //data loaded from the database
Session["myValue"] = new MyCustomObject(10); //data loaded from the cache
I've overridden my Equals method to always return false, yet the data still loads from the cache every time.
Any ideas?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.