-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching Response Headers #28
Comments
@LinuxDoku We have a similar problem. We need to update a cookie, but the action is cached, so the cookie doesn't change. How did you solve your problem? |
We have no fix for this yet. ATM we`re sending a timestamp at the end of the url to disable the caching for this request. Our trainee has implemented correct header caching in mvcdonutcaching but we had no time to code review this feature. He meant it was quite simple to develop - maybe you could give it a try. |
@LinuxDoku If / once you're comfortable sharing your code, that would be awesome. I'd try! clean it up and submit it as a PR to @moonpyk. Been digging into the codebase myself, but don't have a clue where to begin. |
@irii could you commit your fix here on github? Thx, will bring some energy to the office on tuesday ;) |
@LinuxDoku @irii 😃 🍺 |
@irii nice code! Simply adding the headers to the attribute (in a semicolon separated list) is enough? [DonutCache(CachedHeaders = "Content-Range;x-cache-item")] Can't wait to see this in Zion ;) |
@LinuxDoku @irii Ohhhh, OK, I think I understand what you did, please correct me if I'm wrong. Your problem was that you are setting headers, but they are excluded from the cache. So your fix allows you to manually specify which headers to cache. My problem is certain headers ARE cached, and I want them excluded. Specifically, cookies. Your code is nice and useful though! 😃 |
Hi, |
Hello,
is it possible to cache response headers which are set via custom ActionFilter's?
Our application has a ActionFilter which set's the
Content-Range
header by inspecting the view model. This header get's lost when donut caching is serving the site from cache.Thank you!
The text was updated successfully, but these errors were encountered: