How to get all cached keys from caches default

We are using Cloudflare workers along with Cache API to cache the API responses. In our use case, we need to delete certain API caches when something is updated, in order to do that I need all the cache keys which are currently the caches.default .

I checked the documentation and it indicates there are only 3 methods, i.e., put, match, delete.

I am looking for a method that can be used to retrieve all the cached keys.

Any help would be greatly appreciated.

Through the worker there is no such method, you could use Cloudflare API to purge all.,-host-or-prefix