{"id":23511624,"url":"https://github.com/vtopc/wcache","last_synced_at":"2025-10-14T14:15:41.592Z","repository":{"id":102320228,"uuid":"230511668","full_name":"vtopc/wcache","owner":"vtopc","description":"In-memory cache with write-back strategy. DO NOT USE, it's very slow.","archived":false,"fork":false,"pushed_at":"2021-11-19T13:12:34.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-23T21:53:53.375Z","etag":null,"topics":["cache","cache-storage","custom-callback","expiration","expiration-callback","go","golang","graceful-shutdown","in-memory-caching","in-memory-storage","lazy-writers","pubsub","trigger","ttl","write-back","write-behind"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/vtopc/wcache","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/vtopc.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":"2019-12-27T20:10:59.000Z","updated_at":"2023-05-15T09:09:45.000Z","dependencies_parsed_at":"2023-03-13T15:21:50.061Z","dependency_job_id":null,"html_url":"https://github.com/vtopc/wcache","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vtopc/wcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtopc%2Fwcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtopc%2Fwcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtopc%2Fwcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtopc%2Fwcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtopc","download_url":"https://codeload.github.com/vtopc/wcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtopc%2Fwcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019124,"owners_count":26086679,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"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","cache-storage","custom-callback","expiration","expiration-callback","go","golang","graceful-shutdown","in-memory-caching","in-memory-storage","lazy-writers","pubsub","trigger","ttl","write-back","write-behind"],"created_at":"2024-12-25T12:15:39.484Z","updated_at":"2025-10-14T14:15:41.572Z","avatar_url":"https://github.com/vtopc.png","language":"Go","readme":"# wcache\n\n[![License][lic-img]][lic-url]\n[![Godoc Reference][godoc-img]][godoc-url]\n\nImplements in-memory [cache with write-back strategy](https://en.wikipedia.org/wiki/Cache_(computing)#Writing_policies)\n(a cache with expiration).\nAn expiration callback(`expireFn`) will be called when record is expired.\n\n### Features\n* Thread-safe.\n* Per-key or global TTL.\n* Can trigger a custom callback on key expiration(could be used as Pub/Sub with aggregation).\n* Can trigger a custom callback on key collisions(e.g. for aggregating metrics). \nBy default, will overwrite value.\n* Graceful shutdown(using context). Will call expiration callback for all records,\nignoring they TTL.\n\n### Install\n`go get github.com/vtopc/wcache`\n\n### TODO\n* Optional auto-extending expiration on `Get` and/or `Set`.\n\n[godoc-url]: https://godoc.org/github.com/vtopc/wcache\n[godoc-img]: https://godoc.org/github.com/vtopc/wcache?status.svg\n\n[lic-url]: https://github.com/vtopc/wcache/blob/master/LICENSE\n[lic-img]: http://img.shields.io/badge/license-MIT-red.svg?style=flat\n\n### Similar projects\n* https://github.com/mailgun/holster#expirecache\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtopc%2Fwcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtopc%2Fwcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtopc%2Fwcache/lists"}