{"id":20806106,"url":"https://github.com/nowayhecodes/polacache","last_synced_at":"2026-05-28T10:32:26.979Z","repository":{"id":56854671,"uuid":"520310828","full_name":"nowayhecodes/polacache","owner":"nowayhecodes","description":"A deadly simple and thread-safe map cache","archived":false,"fork":false,"pushed_at":"2022-08-14T03:34:22.000Z","size":314,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T22:33:54.499Z","etag":null,"topics":["cache-storage","caching","channels","concurrent","go","go-channel","golang","goroutine","thread-safe"],"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/nowayhecodes.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-08-02T01:21:11.000Z","updated_at":"2023-02-19T03:04:59.000Z","dependencies_parsed_at":"2022-09-22T14:41:17.100Z","dependency_job_id":null,"html_url":"https://github.com/nowayhecodes/polacache","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nowayhecodes/polacache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fpolacache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fpolacache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fpolacache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fpolacache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nowayhecodes","download_url":"https://codeload.github.com/nowayhecodes/polacache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nowayhecodes%2Fpolacache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33605378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cache-storage","caching","channels","concurrent","go","go-channel","golang","goroutine","thread-safe"],"created_at":"2024-11-17T19:18:11.906Z","updated_at":"2026-05-28T10:32:26.952Z","avatar_url":"https://github.com/nowayhecodes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./asset/polacache.png\"  width=\"300\" alt=\"iters\" /\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003ePolacache\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\" style=\"margin-top: -4rem;\"\u003e\n    \u003ch3\u003eA deadly simple and thread-safe map cache.\u003c/h3\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\n#### What?\n\nPolacache is a deadly simple and thread-safe map cache. \nIn it's constructor, you set a cleanupInterval, which launchs a goroutine to perform the cleanup loop.\n\n#### Why?\n\nFor the fun\n\n#### How? \n\n```go\n\npackage main\n\nimport (\n    \"time\"\n    \n    pc \"github.com/nowayhecodes/polacache\"\n)\n\nfunc main() {\n    cache := pc.New(1 * time.Minute)\n\n    exampleItem := pc.Item{\n        Key:   \"example\",\n        Value: 42,\n    }\n\n    cache.Set(exampleItem, time.Now().Add(1*time.Hour).Unix())\n    cache.Get(exampleItem.Key)\n    cache.Delete(exampleItem.Key)\n\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowayhecodes%2Fpolacache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowayhecodes%2Fpolacache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowayhecodes%2Fpolacache/lists"}