Hey guys, I have a question regarding Cloudflare's cache API. I'm developing some features that will

Hey guys, I have a question regarding Cloudflare's cache API. I'm developing some features that will use the cache API a lot and I came across a rather curious situation:

I wanted to create several caches with different keys but I would like to use tags as well because even though each cache has an ID I wanted to have something (which in this case would be using a tag for this) to have a relationship. For example, imagine that I have a cache for a user with ID 50.
I create a cache with this user's information but I would like to put a tag on this cache that says "user" to identify what this cache represents.

When I perform a delete action I would like to use the tag to delete all caches with the "user" tag, thus deleting all related caches. Is this possible through the Cache API using Workers? Because today I only work with different keys from one to another and this has caused me problems in relation to these cases.

I am an Enterprise customer so I have access to several resources available from Cloudflare but I don't know specifically how to do this.
Was this page helpful?