{"id":25403472,"url":"https://github.com/streamdp/microcache","last_synced_at":"2025-04-12T15:13:57.891Z","repository":{"id":273319276,"uuid":"919310481","full_name":"streamdp/microcache","owner":"streamdp","description":"Just a simple implementation of an in-memory cache with entry expiration","archived":false,"fork":false,"pushed_at":"2025-03-25T15:50:08.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T15:13:53.988Z","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/streamdp.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":"2025-01-20T06:48:51.000Z","updated_at":"2025-03-25T15:49:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"b344809d-142d-459f-b871-331390d25c41","html_url":"https://github.com/streamdp/microcache","commit_stats":null,"previous_names":["streamdp/microcache"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdp%2Fmicrocache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdp%2Fmicrocache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdp%2Fmicrocache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdp%2Fmicrocache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamdp","download_url":"https://codeload.github.com/streamdp/microcache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586241,"owners_count":21128998,"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":"2025-02-16T02:39:43.491Z","updated_at":"2025-04-12T15:13:57.885Z","avatar_url":"https://github.com/streamdp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Microcache\nJust a simple implementation of an in-memory cache with entry expiration\n\n### Usage\nYou can use it directly:\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/streamdp/microcache\"\n)\n\nfunc main() {\n\tcache := microcache.New(context.Background(), 0)\n\t_ = cache.Set(\"key1\", \"val1\", time.Hour)\n\n\tfmt.Println(cache.Get(\"key1\"))\n}\n```\nOr create your own cache based on this solution, microCache implements the following interface:\n```go\ntype Cache interface {\n    Get(key string) (any, error)\n    Set(key string, value any, expiration time.Duration) error\n}\n```\nLook at the examples folder for explanations.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamdp%2Fmicrocache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamdp%2Fmicrocache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamdp%2Fmicrocache/lists"}