You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use Vercel KV as my storage. It's an implementation of Redis, but it doesn't expose a Redis URL. Instead, there's a JavaScript client library that supports the same methods.
Ideally, there would be some contract, expressed as a TypeScript interface, for a custom storage. I'd then be able to pass in my own factory instead of "memory" or "redis".
bundlers would be able to tree-shake this library better. As-is, they have to include both the memory and redis storage options because they're both required statically and resolved by a ternary statement
The text was updated successfully, but these errors were encountered:
I'd like to use Vercel KV as my storage. It's an implementation of Redis, but it doesn't expose a Redis URL. Instead, there's a JavaScript client library that supports the same methods.
Ideally, there would be some contract, expressed as a TypeScript interface, for a custom storage. I'd then be able to pass in my own factory instead of
"memory"
or"redis"
.Currently, that's impossible because
getStorage
is closure-scoped, as isgetModules
, which calls it.Some additional benefits of this approach:
localStorage
or Cloudflare KVThe text was updated successfully, but these errors were encountered: