-
Notifications
You must be signed in to change notification settings - Fork 5
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
Rely on cache-control headers #12
Comments
That's not necessarily better though. Caching is a hard problem. I think what we'd need is an option to be passed to the validator |
Could you explain why you don't think so, @RubenVerborgh? Of course, an option to switch of the cache is a good first step. It just would be requesting a lot of unchanged profiles. |
Because the caching headers will be set to 1 day or so, or at least a couple of hours, making the problem worse. |
But that is totally up to the server, which could then use a |
Currently, the WebID issuer cache is a LRU cache with a fixed 60s maximum age. This breaks scenarios like the following: using a token from my first issuer, I add a second issuer to my profile, and immediately (<60s) request some resource using a token from that second issuer.
A first step would be to make the maximum age more easily configurable, e.g. using constructor parameters. However, I believe this would (1) only solve the problems when we then set the maximum age to zero, which obviously (2) would be bad for performance.
I would therefore propose to let go of the fixed cache in favor of a caching mechanism based on the cache-control headers sent by the servers hosting the WebID profiles. Would this be possible?
The text was updated successfully, but these errors were encountered: