discens/aspnetwebapi-outputcache — pull request #2 by discens (2013-02-21 10:38:03+00:00)
Title: Update WebApiOutputCacheAttribute.cs

I think there is a bug. You need to fire setClientCache() in OnActionExecuting too.

Reproduction steps:

Create page that makes a JS call to a WepAPI controller with the caching set.

The response will have the appropriate caching headers.

Subsequent calls will correctly come from cache.

Force a refresh by pressing F5, the response will now come back with Cache-Control:no-cache.