{"id":71768,"library":"renekroon-ttlcache","title":"TTLCache","description":"An in-memory cache with per-entry TTL (time-to-live) expiration, supporting callbacks on eviction.","status":"active","version":"1.7.0","language":"go","source_language":null,"source_url":"https://github.com/ReneKroon/ttlcache","tags":["cache","ttl","in-memory","expiration"],"install":[{"cmd":"go get github.com/ReneKroon/ttlcache","lang":"bash","label":"Install github.com/ReneKroon/ttlcache"}],"dependencies":[],"imports":[{"symbol":"ttlcache","correct":"github.com/ReneKroon/ttlcache"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\t\"github.com/ReneKroon/ttlcache\"\n)\n\nfunc main() {\n\tcache := ttlcache.NewCache()\n\tcache.Set(\"key\", \"value\", time.Minute)\n\tval, _ := cache.Get(\"key\")\n\tfmt.Println(val)\n}","lang":"go","description":"Create a cache, set a key with a TTL, and retrieve it."},"warnings":[],"env_vars":null,"search_vec":"'cach':6,21 'callback':18 'entri':10 'evict':20 'expir':16,26 'in-memori':3,23 'live':15 'memori':5,25 'per':9 'per-entri':8 'support':17 'time':13 'time-to-l':12 'ttl':11,22 'ttlcach':1","created_at":"2026-06-17T18:31:15.447697+00:00","updated_at":"2026-06-17T18:31:15.447697+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ReneKroon/ttlcache","github":"https://github.com/ReneKroon/ttlcache","docs":"https://pkg.go.dev/github.com/ReneKroon/ttlcache#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}