nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Pass Options to Unstorage/CloudflareKvBinding Expiration

Open lassediercks opened this issue 1 year ago • 0 comments

Describe the feature

We are using the unstorage cloudflareKVBinding to store html payloads.

Payloads are invalidated at some point and give a new server build has been deployed - new kv entries for pages will be created. The old kv entries are not cleaned up.

As far as I understood cloudflare offers to set an expiration time on a kv entry.

The unstorage driver does allow the input of transactional options

But Nitro does not offer the options to pass transaction options to the setItem function

I'd love to be able to make use of the expiring keys feature.

If you'd give me an idea where to start I'd happily contribute

Additional information

  • [X] Would you be willing to help implement this feature?

lassediercks avatar Jun 11 '24 09:06 lassediercks