-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: Inconsistent behavior with pages functions runtime for cache deletion in wrangler pages dev
#2575
Comments
Hey! 👋 Thanks for opening this issue. I've raised it internally. 👍 |
Hey again, it looks like we're not going to be able to fix this for a while. 😞 Does this error occur every time or just occasionally? Apologies about this, I'd keep using your workaround for the time being. |
Idk. Should this be considered a bug of miniflare/wrangler or the runtime ? |
This is a bug in the runtime, or more likely a component the runtime communicates with. 👍 |
Hey, I get the same error in Cloudflare Pages (production). The error occurs every time Is there a workaround for this until the problem is fixed? |
Yes there is one. Since you can put, you can put sth with a header like |
Thanks! Looks like putting a Response with |
Oh yeah I have that in my workaround. So glad to know it can work on its own without other tricks. Thanks. |
Which Cloudflare product(s) does this pertain to?
Pages
What version of
Wrangler
are you using?2.11.0
What operating system are you using?
macos 13.1
Describe the Bug
In pages functions, wrangler would allow to delete a certain kind of cache entries while the real runtime won't. The code is like
Wrangler
won't throw on theawait cache.delete(key)
line, while the actual runtime always throwsError: unable to delete cached response
. (and fallback to the workaround, the workaround works though).The cache entry was added like:
And inside
.wrangler/state/cache
, it looks like:(the amazon fields are from upstream, I don't know whether they would be relevant so I would just put them there).
I am not sure whether this is a bug for the real runtime or for workers-sdk. There is a discussion for it at discord id 1074116255134535700 (workers-help > cannot delete cache entries) in cloudflare server.
The text was updated successfully, but these errors were encountered: