{"id":51601,"library":"decred-dcrd-lru","title":"Decred LRU Cache","description":"Package lru implements generic least-recently-used caches with near O(1) performance.","status":"active","version":null,"language":"go","source_language":null,"source_url":"https://github.com/decred/dcrd","tags":["cache","lru","generic","performance"],"install":[{"cmd":"go get github.com/decred/dcrd/lru","lang":"bash","label":"Install github.com/decred/dcrd/lru"}],"dependencies":[],"imports":[{"symbol":"lru","correct":"github.com/decred/dcrd/lru"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/decred/dcrd/lru\"\n)\n\nfunc main() {\n\tcache := lru.NewCache(100)\n\tcache.Put(\"key\", \"value\")\n\tval, ok := cache.Get(\"key\")\n\tfmt.Println(val, ok)\n}","lang":"go","description":"Creates an LRU cache, inserts and retrieves a value."},"warnings":[],"env_vars":null,"search_vec":"'1':16 'cach':3,12,18 'decr':1 'generic':7,20 'implement':6 'least':9 'least-recently-us':8 'lru':2,5,19 'near':14 'o':15 'packag':4 'perform':17,21 'recent':10 'use':11","created_at":"2026-06-15T06:23:13.812145+00:00","updated_at":"2026-06-15T06:23:13.812145+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/decred/dcrd","github":"https://github.com/decred/dcrd","docs":"https://pkg.go.dev/github.com/decred/dcrd/lru#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-15","next_check":"2026-12-12","install_tag":null}}