Added ability to cache specified HTTP headers.#126
Added ability to cache specified HTTP headers.#126mlucas99 wants to merge 2 commits intofilipw:masterfrom
Conversation
|
thanks, this is a good idea, let me wrap my head around this |
|
A bug just cropped up in that code that could cause a 500, so you don't want this code as is. I had duplicated the line AddCachedHeaders call on line 164. |
|
Any update on this functionalty? It seems promising |
|
Is this something that will be added? This PR is the only thing stopping us from using this LIB. |
|
I ended up forking the project and using @mlucas99 changes... The only additional change is that on line 100 ShortTime requires an additional 3rd paramenter.
Thanks! |
|
Hi, Any update on this? I would love to cache custom headers too for some requets |
|
Sorry to bother, is this still a possibility? Do you need any help? thanks! |
|
@mlucas99 could you update the PR to the latest version of I've been using this and it works great thanks! |
|
@filipw Could you merge this? Because I think that let me know if you want me to do it thanks! |
|
I couldn't get this to work with this version, so I updated the code and made the modifications needed to allow for custom headers to be cached. Pull Request: #266 |
Great library, saves a ton of work. Don't know if this is something you're interested in adding but it was a necessity for one of our latest projects.
When a response was cached, it didn't send any of the custom headers we were using to hold the total row count, and the Link header we were using to send pagination links. So I added an OutputCacheAttribute parameter that will preserve headers you specify.
Ex.
[CacheOutput(ClientTimeSpan = 60, ServerTimeSpan = 60, HeadersToInclude = "X-Total,Link")]