Cloudflare Worker KV: get() with an array of keys returns empty, but Promise.all works.
Hello everyone,
I'm encountering an issue with the Cloudflare Worker KV where I get an empty array when trying to retrieve multiple keys at once.
When I run the following code, it returns an empty array:
However, this alternative approach works as expected:
According to the documentation, passing an array of keys to the
get() method should return a Map of the key-value pairs.
Here is my wrangler.jsonc file for reference:
I've also made sure that the preview_id is correctly configured for use with wrangler dev.
Has anyone else experienced this issue or has any idea what might be going wrong?
Thanks0 Replies