timshannon / badgerhold

BadgerHold is an embeddable NoSQL store for querying Go types built on Badger
MIT License
515 stars 52 forks source link

Feature Request: Add TTL support to keys #20

Open ftKnox opened 4 years ago

ftKnox commented 4 years ago

Have you considered adding support for setting TTL values on keys? Would be nice to have this. Maybe via something like:

func (s *Store) InsertTTL(key, data interface{}, ttl time.Duration) {...}
func (s *Store) UpdateTTL(key, data interface{}, ttl time.Duration) {...}
func (s *Store) UpsertTTL(key, data interface{}, ttl time.Duration) {...}

Ref: https://github.com/dgraph-io/badger#setting-time-to-livettl-and-user-metadata-on-keys

killswitch-GUI commented 1 year ago

This would be amazing.

PD-Pramila commented 1 year ago

Any update on adding this TTL feature on keys? Also, are there any plans to add:

  1. Metadata on keys and then supporting that metadata value to filter search results.
  2. Batch processing.