Can't seem to find it, if I add a KV using: ``` const readable_stream = new Response(JSON.stringify

Can't seem to find it, if I add a KV using:

const readable_stream = new Response(JSON.stringify(res)).body;
await c.env.CACHE.put('key' + uuid, readable_stream, { type: "stream", expirationTtl: 86400 });


and return it using:

var cache = await c.env.CACHE.get('key' + uuid, { type: "stream" });
  if(cache && !reset) {
    console.log('Cached', sql)
    return new Response(cache, { status: 200, headers: { "Content-Type": "application/json" } });
  }


That would be the fastest way of returning a json thats streamed back right? or am I missing something?
Was this page helpful?