-
Notifications
You must be signed in to change notification settings - Fork 561
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
KV caching does not appear to work #36
Comments
In my case, I wonder if its because I am attempting to cache POST requests to a RESTDataSource? |
@devinellis I'm doing a get, but I think I've set all the required variables in the readme, but I also don't know of a way I can debug it easily without pushing it out first |
I've got a little more information about this bug. Cache is being read but never written. According to this the interface is super simple to implement, and I believe it's connected correctly. Seems possible I need to pass something in the request header to get caching to write correctly or something, but I cannot figure out where |
welp, nevermind @devinellis. Looking through this, apollo will cache based up the RESTDataSource response
We're setting these via environment variables, but it may be worth a callout in the docs here, I was completely unaware that the RESTDataSource acted like this. |
hey @codewithkristian and team! Looks like the KVCache mechanism isn't working as described (or at least I'm not able to use it with the docs provided). I've set the ID properly and I can confirm I'm setting values with that ID via Wrangler, but when I run it in a worker, nothing ever shows up in the KV cache storage.
Is there a specific ttl header I need to set when I'm hitting this server to get the content cached? It's not easy to debug and I'm unclear how I can see what's happening inside
kv-cache.js
when the worker is running. Thanks in advance!The text was updated successfully, but these errors were encountered: