-
Notifications
You must be signed in to change notification settings - Fork 157
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
Nuster seems to ignore cache-control headers from BE. Like "no-cache" #128
Comments
That's true. The original purpose of this is to cache something cannot be cached or hard to be cached. Image you have a simple query server which use POST to do the search, and every query is against DB. The system is very old and very unlikely to be upgraded to use something like Redis, while every search query cause heavy load in DB server. So we can introduce nuster to cache this kind of query. |
Yes, very true, it might have a purpose as such. But it currently does cache those responses that have an explicit cache-control header (like 'private, no-cache, must-revalidate'), and those should actually not be cache (as instructed). HAproxy does honour these instructions, and unfortunately Nuster does not, while Nuster has a proper PURGE option. I whish Nuster would honour the cache-conrol headers better. The page https://cache-tests.fyi shows Nuster as (at least) respond to the 'no-store' directive, but I don't see this in my setup. Maybe the rule I use is wrong?
|
It's indeed something great to have.
|
I tried the following:
The second request now shows a HIT (where I expected a MISS). Like this (second hit):
|
Yes, it won't work if you just use the acl as is. So
When in request stage, Please refer to https://github.com/jiangwenyuan/nuster#ifunless-condition for the detail request/response stage evaluation. You should use something like this
So in request stage: in response stage: |
Nuster seems to ignore cache-control headers from BE.
Like "no-cache"
Seems ridiculous, but this is what I see.
Any truth in it?
The text was updated successfully, but these errors were encountered: