{"id":13411804,"url":"https://github.com/golang/groupcache","last_synced_at":"2025-05-12T17:54:26.725Z","repository":{"id":37722394,"uuid":"11593442","full_name":"golang/groupcache","owner":"golang","description":"groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.","archived":false,"fork":false,"pushed_at":"2024-11-29T21:07:26.000Z","size":84,"stargazers_count":13142,"open_issues_count":41,"forks_count":1398,"subscribers_count":471,"default_branch":"master","last_synced_at":"2025-04-16T22:24:24.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/golang.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":"2013-07-22T21:55:07.000Z","updated_at":"2025-04-16T17:42:13.000Z","dependencies_parsed_at":"2022-07-13T16:44:30.507Z","dependency_job_id":"6fbdd0de-a8fd-44bb-ae99-f5f842c3c053","html_url":"https://github.com/golang/groupcache","commit_stats":{"total_commits":43,"total_committers":30,"mean_commits":"1.4333333333333333","dds":0.8837209302325582,"last_synced_commit":"41bb18bfe9da5321badc438f91158cd790a33aa3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fgroupcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fgroupcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fgroupcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fgroupcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang","download_url":"https://codeload.github.com/golang/groupcache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250177608,"owners_count":21387631,"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-07-30T20:01:17.093Z","updated_at":"2025-04-23T17:01:50.237Z","avatar_url":"https://github.com/golang.png","language":"Go","readme":"# groupcache\n\n## Summary\n\ngroupcache is a distributed caching and cache-filling library, intended as a\nreplacement for a pool of memcached nodes in many cases.\n\nFor API docs and examples, see http://godoc.org/github.com/golang/groupcache\n\n## Comparison to memcached\n\n### **Like memcached**, groupcache:\n\n * shards by key to select which peer is responsible for that key\n\n### **Unlike memcached**, groupcache:\n\n * does not require running a separate set of servers, thus massively\n   reducing deployment/configuration pain.  groupcache is a client\n   library as well as a server.  It connects to its own peers, forming\n   a distributed cache.\n\n * comes with a cache filling mechanism.  Whereas memcached just says\n   \"Sorry, cache miss\", often resulting in a thundering herd of\n   database (or whatever) loads from an unbounded number of clients\n   (which has resulted in several fun outages), groupcache coordinates\n   cache fills such that only one load in one process of an entire\n   replicated set of processes populates the cache, then multiplexes\n   the loaded value to all callers.\n\n * does not support versioned values.  If key \"foo\" is value \"bar\",\n   key \"foo\" must always be \"bar\".  There are neither cache expiration\n   times, nor explicit cache evictions.  Thus there is also no CAS,\n   nor Increment/Decrement.  This also means that groupcache....\n\n * ... supports automatic mirroring of super-hot items to multiple\n   processes.  This prevents memcached hot spotting where a machine's\n   CPU and/or NIC are overloaded by very popular keys/values.\n\n * is currently only available for Go.  It's very unlikely that I\n   (bradfitz@) will port the code to any other language.\n\n## Loading process\n\nIn a nutshell, a groupcache lookup of **Get(\"foo\")** looks like:\n\n(On machine #5 of a set of N machines running the same code)\n\n 1. Is the value of \"foo\" in local memory because it's super hot?  If so, use it.\n\n 2. Is the value of \"foo\" in local memory because peer #5 (the current\n    peer) is the owner of it?  If so, use it.\n\n 3. Amongst all the peers in my set of N, am I the owner of the key\n    \"foo\"?  (e.g. does it consistent hash to 5?)  If so, load it.  If\n    other callers come in, via the same process or via RPC requests\n    from peers, they block waiting for the load to finish and get the\n    same answer.  If not, RPC to the peer that's the owner and get\n    the answer.  If the RPC fails, just load it locally (still with\n    local dup suppression).\n\n## Users\n\ngroupcache is in production use by dl.google.com (its original user),\nparts of Blogger, parts of Google Code, parts of Google Fiber, parts\nof Google production monitoring systems, etc.\n\n## Presentations\n\nSee http://talks.golang.org/2013/oscon-dl.slide\n\n## Help\n\nUse the golang-nuts mailing list for any discussion or questions.\n","funding_links":[],"categories":["Misc","语言资源库","开源类库","Go-lang","Database","Go","Go (134)","Open source library","0x0C. golang/groupcache","In-memory libraries (by language)","others","其他__大数据","数据库","\u003cspan id=\"数据库-database\"\u003e数据库 Database\u003c/span\u003e","Data Integration Frameworks","Generators","Key-Value","数据库  `go语言实现的数据库`","Uncategorized"],"sub_categories":["go","缓存","Caches","Advanced Console UIs","Cache","网络服务_其他","标准 CLI","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Fgroupcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang%2Fgroupcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Fgroupcache/lists"}