nodejs / undici

An HTTP/1.1 client, written from scratch for Node.js
https://nodejs.github.io/undici
MIT License
6.16k stars 533 forks source link

use node:sqlite in cache api #3543

Open KhafraDev opened 1 month ago

KhafraDev commented 1 month ago

The web cache api that builds off of fetch primitives would massively benefit from persistent storage. In the past we've discussed caching via files on device, but I think either web storage or node:sqlite could lead to a more reliable approach.

metcoder95 commented 1 month ago

It would be nice, shall we do this right away (given that node:sqlite is experimental) or enable/disable it somehow through a flag and mark it as experimental?

KhafraDev commented 1 month ago

I was thinking of adding adapters similar to the dispatcher api that would let people add their own storage mechanisms. I think a built-in sqlite one would be a good start.