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
Feature request: actual custom key generation #513
Comments
Hey, @teodorescuserban I'm actually implementing it in the core. |
The PR is ready @teodorescuserban can you try it? |
@darkweak, thank you for your PR! Unfortunately, I am not able to build caddy with the specific commit:
|
I realised that was not the last commit in the PR; the last one doesn't work as well
|
|
Alright, the build does work. My bad, @darkweak. |
OK, I tested it. It seems to work well. However, in my use case I would need to be able to feed a custom variable in the key template. This doesn't seem to work properly. This is my Caddyfile:
Doing a
Any ideas, @darkweak ? |
I mean, this particular issue can be closed by you PR, I am wondering where I should open a new issue about the custom value though :) |
@teodorescuserban It should work with the commit |
@darkweak it works like a charm. erm, actually, id does work very well ;) Thank you for your quick response! This ticket can now be closed imho (along with PR merge) When we should expect this feature to be released in a new version? |
I see that this feature has been requested at least twice but got entrenched in a particular use case (#318 that just disables the body and #444 which goes on to discuss and fix
Content-Length
issues.My particular use case is that I want to remove an argument from the query just for the cache key, the request should go to the upstream server unchanged. However, because the argument that I want removed only identifies the client, and because all data is public, I'd like to cache a response no matter the client argument is, because it will be the same exact response.
Also, I am not interested in the method, protocol and host and port as part of the key. For me, just the uri_path and the query (without a specific parameter) is required.
Any chance to be able to get a way to add a custom key?
I should also mention that I am using the
cache-handler
caddy plugin.Thank you.
The text was updated successfully, but these errors were encountered: