i’m the developer of an open-source cache solution, “upcache”.
The idea is to let the upstream application pass HTTP headers hints back to the caching proxy, in a similar way to Vary and Cache-Control directives, but with additional protocols between caching proxy and upstream, covering those use cases:
- grouping urls together using a cache “domain” (key, tag, you name it) and any non-GET(or HEAD) request invalidates the urls bound to that domain
- grouping trusted jwt permissions (using rsa pub/priv) to cache urls by permissions (and not by account) on top of “domain” keys - grouping each authenticated user with all the other users using the same permissions
- mapping an url to another url, to avoid cache variants to fill the cache. This is useful for 404 pages, or redirected pages.
I’m currently using those concepts without Cloudflare, implementing it with nginx/lua and upstream nodejs applications. And i think Cloudflare should implement it.
- upcache: GitHub - kapouer/upcache: Caching proxy dynamically configured by upstream applications
- nginx using upcache: GitHub - livejack/proxy
- upstream using upcache: GitHub - livejack/server
i know it’s not on anyone’s agenda but it really adresses a common problem with caching proxies and upstream applications in a very neat way !