Skip to content
codinlPublic

About

ttlmap

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

TtlMap - an in-memory TTL map with expiration

  1. Thread-safe
  2. Auto-Expiring after a certain time
  3. Auto-Extending expiration on Gets

Usage

import (
  "time"
  "github.com/codinl/ttlmap"
)

func main () {
  m := ttlmap.NewTtlMap(time.Second)
  m.Set("key", "value")
  value, exists := m.Get("key")
  count := m.Count()
}

About

ttlmap

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages