microsoftarchive / Ttlcache
Licence: mit
an in-memory LRU string-string map with expiration for golang
Stars: ✭ 92
Programming Languages
go
31211 projects - #10 most used programming language
TTLCache - an in-memory LRU cache with expiration
TTLCache is a minimal wrapper over a string map in golang, entries of which are
- Thread-safe
- Auto-Expiring after a certain time
- Auto-Extending expiration on
Get
s
Usage
import (
"time"
"github.com/wunderlist/ttlcache"
)
func main () {
cache := ttlcache.NewCache(time.Second)
cache.Set("key", "value")
value, exists := cache.Get("key")
count := cache.Count()
}
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].