Personally, I would like to make my WCF services ready for the session and store my caches in the session. A compromise always depends on how static the data is and how much data needs to be torn down.
For very static data, I can cache the duration of the session or until the data has changed (determining whether another user has changed my cached session data is a different story). For very dynamic data, itβs hard for me to trust the cache for longer than a few minutes (which is not yet completely safe).
The question is, what are you talking about client side caching or server side caching? So, are you trying to cache the data sets on the client or just cache on the web server that pulled the data set from the database server?
If you're talking about client caching, you can cache cookies, cache javascript variables, use HTTP caching, or the aforementioned caching mechanism for HTML 5 applications.
All about the right tool to work, although in this case there is no hammer;)
source share