{"id":16683063,"url":"https://github.com/hlts2/gocache","last_synced_at":"2025-04-09T23:14:36.282Z","repository":{"id":57489929,"uuid":"142179416","full_name":"hlts2/gocache","owner":"hlts2","description":"Ultra fast lock-free cache library","archived":false,"fork":false,"pushed_at":"2024-01-24T01:24:57.000Z","size":604,"stargazers_count":9,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T23:14:31.916Z","etag":null,"topics":["cache","cache-library","fast","fastest","go","gocache","golang","goroutine-safe","hlts2","key-value","kvs","lock-free","simple","ultrafast"],"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/hlts2.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":"2018-07-24T15:38:46.000Z","updated_at":"2024-05-10T00:11:53.000Z","dependencies_parsed_at":"2024-06-19T05:28:21.104Z","dependency_job_id":"36a88fc1-a9bb-4410-9271-e0a9ac396927","html_url":"https://github.com/hlts2/gocache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgocache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgocache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgocache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fgocache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlts2","download_url":"https://codeload.github.com/hlts2/gocache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125591,"owners_count":21051770,"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":["cache","cache-library","fast","fastest","go","gocache","golang","goroutine-safe","hlts2","key-value","kvs","lock-free","simple","ultrafast"],"created_at":"2024-10-12T14:10:12.748Z","updated_at":"2025-04-09T23:14:36.263Z","avatar_url":"https://github.com/hlts2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gocache [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Go Report Card](https://goreportcard.com/badge/github.com/hlts2/gocache)](https://goreportcard.com/report/github.com/hlts2/gocache) [![Gitter](https://badges.gitter.im/hlts2/gocache.svg)](https://gitter.im/hlts2/gocache?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge) [![GoDoc](http://godoc.org/github.com/hlts2/gocache?status.svg)](http://godoc.org/github.com/hlts2/gocache)\n\ngocache is simple ultra fast lock-free cache library written in golang.\n\n## Requirement\nGo (\u003e= 1.9)\n\n## Installation\n\n```shell\ngo get github.com/hlts2/gocache\n```\n\n## Example\n\n### Basic Example\n\n`Set` is `Set(key string, value interface{})`, so you can set any type of object.\n\n```go\n\nvar (\n  key1 = \"key_1\"\n  key2 = \"key_2\"\n  key3 = \"key_3\"\n\n  value1  = \"value_1\"\n  value2  = 1234\n  value3  = struct{}{}\n)\n\ncache := gocache.New()\n\n// default expire is 50 Seconds\nok := cache.Set(key1, value1) // true\nok := cache.Set(key2, value2) // true\nok := cache.Set(key3, value3) // true\n\n// get cached data\nv, ok := cache.Get(key1)\n\nv, ok := cache.Get(key2)\n\nv, ok := cache.Get(key3)\n\n```\n\n## Benchmarks\n\n[gocache](https://github.com/hlts2/gocache) vs [go-cache](https://github.com/patrickmn/go-cache) vs [gache](https://github.com/kpango/gache) vs [gcache](https://github.com/bluele/gcache)\n\nThe version of golang is `go1.10.3 linux/amd64`\n![Bench](https://github.com/hlts2/gocache/blob/master/images/benchmarks.png)\n\n## Author\n[hlts2](https://github.com/hlts2)\n\n## LICENSE\ngocache released under MIT license, refer [LICENSE](https://github.com/hlts2/gocache/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fgocache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlts2%2Fgocache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fgocache/lists"}