{"id":15294796,"url":"https://github.com/dboslee/lru","last_synced_at":"2025-04-13T15:01:08.333Z","repository":{"id":43154562,"uuid":"446224683","full_name":"dboslee/lru","owner":"dboslee","description":"LRU cache using go generics","archived":false,"fork":false,"pushed_at":"2022-07-06T22:13:04.000Z","size":8,"stargazers_count":119,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-27T05:51:14.017Z","etag":null,"topics":["generics","go","golang","lru","lru-cache"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dboslee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-09T23:13:46.000Z","updated_at":"2024-05-16T09:37:08.000Z","dependencies_parsed_at":"2022-09-26T20:30:49.659Z","dependency_job_id":null,"html_url":"https://github.com/dboslee/lru","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dboslee%2Flru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dboslee%2Flru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dboslee%2Flru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dboslee%2Flru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dboslee","download_url":"https://codeload.github.com/dboslee/lru/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732474,"owners_count":21152851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generics","go","golang","lru","lru-cache"],"created_at":"2024-09-30T17:07:01.864Z","updated_at":"2025-04-13T15:01:08.162Z","avatar_url":"https://github.com/dboslee.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LRU Cache\nA simple LRU cache using go generics.\n\n## Examples\nBasic usage.\n```go\nfunc main() {\n    cache := lru.New[string, string]()\n    cache.Set(\"key\", \"value\")\n    value, _ := cache.Get(\"key\")\n    fmt.Println(value)\n}\n```\nSet the capacity using the `lru.WithCapacity` option. The default capacity is set to 10000.\n```go\nfunc main() {\n    cache := lru.New[string, string](lru.WithCapacity(100))\n    ...\n}\n```\nA thread safe implementation is included for convenience.\n```go\nfunc main() {\n    cache := lru.NewSync[string, string](lru.WithCapacity(100))\n    ...\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdboslee%2Flru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdboslee%2Flru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdboslee%2Flru/lists"}