FWIW, our Workers product is pretty good at allowing you to define custom caching rules. We have a section in the Workers docs specifically focused on the Cache API: https://developers.cloudflare.com/workers/reference/cache-ap...
If that doesn’t help you build what you’re looking for, happy to chat via email and hear more about what you need: kristian@cloudflare