Categorygithub.com/gravitational/ttlmap
2.0.0-20221215172817-6397c8f9c023
Repository: https://github.com/gravitational/ttlmap.git
Documentation: pkg.go.dev

# README

Build Status Build Status

TtlMap

Redis-like Map with expiry times and maximum capacity


import "github.com/mailgun/ttlmap"

mh, _ := ttlmap.NewMap(20)
mh.Set("key1", "value", 20)
valI, exists := mh.Get("key2")
if exists {
   val := valI.(string)
}

# Packages

Copyright 2017 Mailgun Technologies Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.