{"id":19621636,"url":"https://github.com/pkg6/go-cache","last_synced_at":"2025-02-26T19:16:02.673Z","repository":{"id":192568371,"uuid":"644803669","full_name":"pkg6/go-cache","owner":"pkg6","description":"Golang Cache package","archived":false,"fork":false,"pushed_at":"2023-11-21T14:49:17.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-09T11:41:14.917Z","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/pkg6.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":"2023-05-24T09:39:14.000Z","updated_at":"2023-06-25T06:07:26.000Z","dependencies_parsed_at":"2023-11-21T15:54:50.967Z","dependency_job_id":null,"html_url":"https://github.com/pkg6/go-cache","commit_stats":null,"previous_names":["pkg6/go-cache"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgo-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgo-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgo-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgo-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkg6","download_url":"https://codeload.github.com/pkg6/go-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240917723,"owners_count":19878308,"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-11-11T11:23:49.939Z","updated_at":"2025-02-26T19:16:02.645Z","avatar_url":"https://github.com/pkg6.png","language":"Go","readme":"## GoCache\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/pkg6/go-cache)](https://goreportcard.com/report/github.com/pkg6/go-cache)\n[![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/pkg6/go-cache?tab=doc)\n[![Sourcegraph](https://sourcegraph.com/github.com/pkg6/go-cache/-/badge.svg)](https://sourcegraph.com/github.com/pkg6/go-cache?badge)\n[![Release](https://img.shields.io/github/release/pkg6/go-cache.svg?style=flat-square)](https://github.com/pkg6/go-cache/releases)\n\n\n## Installation\n\nMake sure you have a working Go environment (Go 1.18 or higher is required). See the [install instructions](https://golang.org/doc/install.html).\n\nTo install [GoCache](https://github.com/pkg6/go-cache), simply run:\n\n```\ngo get github.com/pkg6/go-cache\n```\n\n## Example\n\n```\npackage main\n\nimport (\n\t\"github.com/pkg6/go-cache\"\n)\n\nfunc main() {\n\tc := cache.New()\n\tc.Extend(cache.NewFileCache())\n\tc.Set(\"cache\", \"test\", 0)\n\tc.Get(\"cache\")\n\tc.GetMulti([]string{\"cache\"})\n\tc.Delete(\"cache\")\n\tc.Has(\"cache\")\n\tc.Increment(\"cache_inc\", 1)\n\tc.Decrement(\"cache_dec\", 1)\n\tc.Clear()\n\tc.Pull(\"cache\")\n\tc.Remember(\"cache\", func() any {\n\t\treturn \"test1\"\n\t}, 0)\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Fgo-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkg6%2Fgo-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Fgo-cache/lists"}