filipw / Strathweb.CacheOutput

ASP.NET Web API CacheOutput - library to allow you to cache the output of ApiControllers
Other
883 stars 254 forks source link

Put and Post Support #240

Closed ibrahimozgon closed 5 years ago

ibrahimozgon commented 6 years ago

Parameters added to format parameters. Put and Post methods are added to IsCacheAllowed method

filipw commented 5 years ago

Thanks a lot for the PR - however the current implementation is by design. I think a default of caching only for GET requests is a good compromise. And if you want to do it differently, it is always possible to subclass [CacheOutput] and override IsCachingAllowed (that's why it is virtual) if you need to change the behavior. Note that we cannot also just try to parse the body to a JObject, there can be many more media types in play.