alexedwards / scs

HTTP Session Management for Go
MIT License
2.13k stars 166 forks source link

Add BadgerDB session store #66

Closed alinnert closed 5 years ago

alinnert commented 5 years ago

Alright, badgerstore is finished. 🎉

I took a lot of inspiration from redisstore since both are key value stores. And both have direct TTL support for values.

Talking about TTL: Badger only supports TTL values >= one second. This means, the tests take about two seconds. One second for TTL, and two seconds for the time.Wait(). With values below one second the test may or may not pass. It's a random outcome.

Sub-second TTL is planned for version 2 though.

alexedwards commented 5 years ago

That all looks brilliant, thank you!