I'm stumped as to how to solve it from the solution above. I've tried various
combinations and nothing works with IIS 7. Selecting the 'ServerAndClient' would enable Client Caching -- but do nothing for the Server side!?!?
Here's what I've defined (perhaps mine is slightly different because I use a Session State mode of 'InProc' to manage logged in user sessions within the Application Pool Worker Process that should live for the duration of the Session or App Pool):
I used Firefox 16.0 to test the URL request and re-request it to test the cache (independent of jQuery or other frameworks). Firebug confirms the URL Parameters match, but Server side caching doesn't work.
Q: Do I have to do anything or should IIS simply cache the response for 60 seconds if the URL and URL Params have been used before?
It appears the 'duration' only controls writing the 'Expire' header entry within the HTTP Response when the mode includes the 'Client' or 'ServerAndClient'?
Q: Is the use of 'InProc' causing the Server Caching to be ignored? Do I have to use AppFabric to make this work or should IIS just handle this within the Worker Process that stays alive (with App Pool configured to rarely recycle unless Web Service
changes)?
AppFabric seems to be going away and Microsoft seems to be encouraging people to move toward Azure and Cloud Servers. I see no reason the 'InProc' shouldn't work -- but wanted to see what others think about the internals of IIS.
Q: While I can use Client Caching, I'd rather try Server caching to have control over purging when the user logs out. Is this possible?
It seems I may have to define my own caching at the Server Side. It would be nice to have this automatically work.
MysticW
Member
14 Points
7 Posts
OutputCache(CacheProfile)
Nov 07, 2012 01:58 AM|LINK
split from: http://forums.asp.net/t/1810343.aspx/1?OutputCache+CacheProfile+
Here's what I've defined (perhaps mine is slightly different because I use a Session State mode of 'InProc' to manage logged in user sessions within the Application Pool Worker Process that should live for the duration of the Session or App Pool):
1. Web.Config:
2. MyWebService.cs:
3. MyReport
4. Testing
I used Firefox 16.0 to test the URL request and re-request it to test the cache (independent of jQuery or other frameworks). Firebug confirms the URL Parameters match, but Server side caching doesn't work.
Q: Do I have to do anything or should IIS simply cache the response for 60 seconds if the URL and URL Params have been used before?
It appears the 'duration' only controls writing the 'Expire' header entry within the HTTP Response when the mode includes the 'Client' or 'ServerAndClient'?
Q: Is the use of 'InProc' causing the Server Caching to be ignored? Do I have to use AppFabric to make this work or should IIS just handle this within the Worker Process that stays alive (with App Pool configured to rarely recycle unless Web Service changes)?
AppFabric seems to be going away and Microsoft seems to be encouraging people to move toward Azure and Cloud Servers. I see no reason the 'InProc' shouldn't work -- but wanted to see what others think about the internals of IIS.
Q: While I can use Client Caching, I'd rather try Server caching to have control over purging when the user logs out. Is this possible?
It seems I may have to define my own caching at the Server Side. It would be nice to have this automatically work.
MysticW
Member
14 Points
7 Posts
Re: OutputCache(CacheProfile)
Nov 07, 2012 07:52 PM|LINK
Here is what I'm guessing is going on...
- The 'outputCacheProfiles' appears to only manage writing the 'Cache-Control' header that is written within the HTTP Responses.
- It appears I need to write my own Caching mechanism to save and lookup to determine whether to use the Cache Response Data or to create a new one.
Q: Do I have this right?
Q: Can I use the HttpContext.Cache object to persist the Cache only for the Session?
oak_silver
Member
418 Points
64 Posts
Re: OutputCache(CacheProfile)
Nov 08, 2012 05:18 AM|LINK
What service are you using?
Optimizing Web Services Performance with Caches
http://docs.oracle.com/cd/E12890_01/ales/docs32/webservicesprogrammersguide/cache.html
Using the Web Services Client Authorization Cache
http://docs.oracle.com/cd/E13169_01/ales/docs22/webservicesprogrammersguide/cache.html