How to Purge the cache of APIs exposed by GET in Cloudflare Workers

We use Cloudflare Workers / Hono to expose our WebAPI.
I want to purge this cache when data is updated, but I don’t know whether I should use Cloudflare’s PurgeAPI or cache.delete in Workers, and I have tried both, but they don’t work.

For example, the URL is assumed to be as follows

example.com/?id=abcd1234

I was able to solve the problem myself. The only cause was that the result was always false when running on localhost.
I actually deployed it and checked the behavior, and the following code gave me the intended behavior.

  const customCacheName = 'translate';
  const cacheKey = 'https://example.com?id=1234'
  const cache = await caches.open(customCacheName);
  await cache.delete(cacheKey);