{"id":17787645,"url":"https://github.com/acim/cog","last_synced_at":"2025-06-19T19:40:34.000Z","repository":{"id":114224743,"uuid":"569588895","full_name":"acim/cog","owner":"acim","description":"Thread safe generic cache implementations in Go","archived":false,"fork":false,"pushed_at":"2023-09-04T16:27:32.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T00:23:02.760Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-23T07:04:04.000Z","updated_at":"2022-11-23T07:09:35.000Z","dependencies_parsed_at":"2024-06-21T08:40:22.855Z","dependency_job_id":"e884fc35-53a2-4d92-834d-44cb43a9af57","html_url":"https://github.com/acim/cog","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"fffd208c00c4ec5cdd8bcc084b14a9443a4f3d80"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/acim/cog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fcog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fcog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fcog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fcog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acim","download_url":"https://codeload.github.com/acim/cog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fcog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260818567,"owners_count":23067732,"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":[],"created_at":"2024-10-27T10:12:08.869Z","updated_at":"2025-06-19T19:40:28.977Z","avatar_url":"https://github.com/acim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cog\n\n[![pipeline](https://github.com/acim/cog/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/acim/cog/actions/workflows/pipeline.yaml)\n[![Go Reference](https://pkg.go.dev/badge/go.acim.net/cog.svg)](https://pkg.go.dev/go.acim.net/cog)\n[![Go Report](https://goreportcard.com/badge/go.acim.net/cog)](https://goreportcard.com/report/go.acim.net/cog)\n![Go Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?style=flat\u0026logo=go)\n\nThread safe generic cache implementations in Go, fully tested and optimized for best performance.\n\n## [LRU Cache](\u003chttps://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)\u003e) Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"go.acim.net/cog/lru\"\n)\n\nfunc main() {\n\tcache := lru.NewCache[string, string](10)\n\n\tcache.Set(\"foo\", \"bar\")\n\n\tv, ok := cache.Get(\"foo\")\n\tif !ok {\n\t\tpanic(\"want value\")\n\t}\n\n\tfmt.Printf(\"foo = %s\\n\", v)\n}\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facim%2Fcog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facim%2Fcog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facim%2Fcog/lists"}