-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support for Cache Tags #112
Comments
Hi, Thanks for this, yeah I think this would be great. I'm working on some other purge related things at the moment, but I'll take a look at this afterwards. Of the examples you've sent, the CloudFlare version seems the most appealing. I like everything about it, except that tags are case insensitive for some reason. I'd prefer them to be case sensitive, because I think a common pattern would be to use some kind of ID system from the origin server, which is more likely to be case sensitive than not. James. |
@pintsized Thanks. I agree, those are not manual tags, they should be case-sensitive as such. I think tag leading and trailing whitespace should not be significant unless escaped as I haven't written anything in Lua, but I can try to help with some guidance, and I can definitely help with testing! |
By the way, there's another Redis-based Nginx module that does wildcard purges. Maybe you guys may combine your efforts: https://github.com/wandenberg/nginx-selective-cache-purge-module @wandenberg ^^^ |
@nikolay as far as I could see there are some differences on the modules that I'm not sure if make sense to combine them. The first obvious is this one needs lua support, the other use only C. |
Yeah, there's not really any room for combining efforts that I can see. Ledge replaces the built in cache and proxy mechanisms of Nginx, choosing to implement all of this with Lua and Redis to provide flexibility / scriptability etc. It's not able to interact with the existing Nginx cache engine. The Redis client (and also the HTTP client used to fetch upstream resources) uses the cosocket API provided by the lua-nginx-module. So it's synchronous, but 100% non-blocking. |
It would be nice to implement purging by tags (ala CloudFlare and Varnish' bans). The mechanism is explained here:
I am trying to implement this via globs, but this is not the most efficient way.
Also:
The text was updated successfully, but these errors were encountered: