{"id":25815738,"url":"https://github.com/mgnsk/evcache","last_synced_at":"2025-02-28T04:32:50.396Z","repository":{"id":52642164,"uuid":"330797909","full_name":"mgnsk/evcache","owner":"mgnsk","description":"Package evcache implements a concurrent key-value cache with capacity overflow eviction, item expiry and deduplication.","archived":false,"fork":false,"pushed_at":"2025-01-17T14:49:14.000Z","size":426,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T15:44:17.705Z","etag":null,"topics":["agecache","cache","capacity","deduplication","expiry","fetch","go","golang","lfu","lru","map","realloc","sync","ttl","ttl-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/mgnsk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-18T22:05:37.000Z","updated_at":"2025-01-17T14:42:42.000Z","dependencies_parsed_at":"2024-03-30T20:28:08.829Z","dependency_job_id":"f9c4b92c-a46f-4b0b-9728-4eac0839c0d8","html_url":"https://github.com/mgnsk/evcache","commit_stats":{"total_commits":200,"total_committers":1,"mean_commits":200.0,"dds":0.0,"last_synced_commit":"94bc2ab44f03780943150560ac288779315b2a57"},"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgnsk%2Fevcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgnsk%2Fevcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgnsk%2Fevcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgnsk%2Fevcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgnsk","download_url":"https://codeload.github.com/mgnsk/evcache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241101661,"owners_count":19909943,"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":["agecache","cache","capacity","deduplication","expiry","fetch","go","golang","lfu","lru","map","realloc","sync","ttl","ttl-cache"],"created_at":"2025-02-28T04:32:49.755Z","updated_at":"2025-02-28T04:32:50.389Z","avatar_url":"https://github.com/mgnsk.png","language":"Go","readme":"# evcache\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/mgnsk/evcache/v4.svg)](https://pkg.go.dev/github.com/mgnsk/evcache/v4)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mgnsk/evcache/v4)](https://goreportcard.com/report/github.com/mgnsk/evcache/v4)\n\nPackage evcache implements a concurrent key-value cache with capacity overflow eviction, item expiry and deduplication.\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/mgnsk/evcache/v4\"\n)\n\nfunc main() {\n\tc := evcache.New[string, string](\n\t\tevcache.WithCapacity(128),\n\t\tevcache.WithPolicy(evcache.LRU),\n\t\tevcache.WithTTL(time.Minute),\n\t)\n\n\t// Fetches an existing value or calls the callback to get a new value.\n\tresult, err := c.Fetch(\"key\", func() (string, error) {\n\t\t// Possibly a very long network call. It only blocks write access to this key.\n\t\t// Read access for this key returns as if the value does not exist.\n\t\treturn \"value\", nil\n\t})\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Use the result.\n\tprintln(result)\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgnsk%2Fevcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgnsk%2Fevcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgnsk%2Fevcache/lists"}