Skip to content
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

suggestion: BYO Deno.Kv instance #309

Open
MarkTiedemann opened this issue Feb 26, 2024 · 1 comment
Open

suggestion: BYO Deno.Kv instance #309

MarkTiedemann opened this issue Feb 26, 2024 · 1 comment

Comments

@MarkTiedemann
Copy link

MarkTiedemann commented Feb 26, 2024

Currently, this module always opens a new Deno.Kv instance.

const kv = await Deno.openKv(path);

Would it make sense to add a kv property to the CreateHelperOptions when calling createHelpers?

Simply put, Bring Your Own KV. :)

Advantages:

  • No need to open a second instance if one is already open
  • You can choose which KVs to put the session data into if you're using multiple databases
@iuioiua iuioiua changed the title Add option to provide Deno.Kv instance suggestion: BYO Deno.Kv instance Mar 1, 2024
@iuioiua
Copy link
Contributor

iuioiua commented Mar 1, 2024

We previously considered doing this and decided not to to make the data only accessible to the module. Let me ask a few more questions internally and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants