I have the following caching attribute on my controller method:
[CacheOutput(ClientTimeSpan = 14400, ServerTimeSpan = 14400)]
I am attempting to clear the cache. However, after running this line of code:
//clear cache
cache.RemoveStartsWith(Configuration.CacheOutputConfiguration().MakeBaseCachekey("BeamsController", "Get"));
I am still getting a 304 not-modified response without the controller method being invoked.
I am using this library https://github.com/filipw/AspNetWebApi-OutputCache
seems to work, instead of 'manual invalidation' (
RemoveStartsWith
), above.In fact, after reading the source code of the attribute, it appears that the documentation is wrong and it should be:
which works as expected, calling the method.