I know all about the AspNetCacheProfileAttribute
. But is there any way to hook into the cache programmatically? I've tried using Response.Cache in global.asax which seems to set the correct client-side headers but the response is never cached on the server.
I don't think you can do it unless you build your own solution. I just checked implementation of AspNetCahceProfileAttribute
which only add internal CachingParameterInspector
to the operation dispatcher. This has two problems:
AspNetCacheProfileAttribute
There is no API available to modify already assigned and configured parameter inspector