{"id":16936487,"url":"https://github.com/jonhoo/cucache","last_synced_at":"2025-03-22T12:31:58.887Z","repository":{"id":30205234,"uuid":"33756172","full_name":"jonhoo/cucache","owner":"jonhoo","description":"Fast PUT/GET/DELETE in-memory key-value store for lookaside caching","archived":false,"fork":false,"pushed_at":"2015-06-10T15:13:15.000Z","size":1213,"stargazers_count":63,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-15T14:55:57.973Z","etag":null,"topics":["caching","in-memory","key-value","memcache-server","memcached"],"latest_commit_sha":null,"homepage":null,"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/jonhoo.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}},"created_at":"2015-04-11T00:07:51.000Z","updated_at":"2023-03-09T01:04:42.000Z","dependencies_parsed_at":"2022-08-27T19:11:56.877Z","dependency_job_id":null,"html_url":"https://github.com/jonhoo/cucache","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/jonhoo%2Fcucache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fcucache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fcucache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fcucache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhoo","download_url":"https://codeload.github.com/jonhoo/cucache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959444,"owners_count":20538625,"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":["caching","in-memory","key-value","memcache-server","memcached"],"created_at":"2024-10-13T20:57:07.763Z","updated_at":"2025-03-22T12:31:58.536Z","avatar_url":"https://github.com/jonhoo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cucache\nFast PUT/GET/DELETE in-memory key-value store for lookaside caching.\n\n[![Build Status](https://travis-ci.org/jonhoo/cucache.svg?branch=master)](https://travis-ci.org/jonhoo/cucache)\n\nA mostly complete implementation the memcache\n[text](https://github.com/memcached/memcached/blob/master/doc/protocol.txt)\nand\n[binary](https://code.google.com/p/memcached/wiki/MemcacheBinaryProtocol)\nprotocols can be found inside [cucache](cucache/). The binary protocol\nhas been tested using\n[memcached-test](https://github.com/dustin/memcached-test), and the text\nprotocol with simple test cases extracted from the protocol\nspecification.\n\nThe implementation uses Cuckoo hashing along with several\n[concurrency](https://www.cs.cmu.edu/~dga/papers/memc3-nsdi2013.pdf)\n[optimizations](https://www.cs.princeton.edu/~mfreed/docs/cuckoo-eurosys14.pdf).\nThe implementation uses much of the code from [Dustin Sallings'\ngomemcached](https://github.com/dustin/gomemcached) for the binary\nprotocol.\n\n## Known limitations and outstanding things\n\n  - Needs configurable debugging information output\n  - The touch command is not implemented; see [dustin/gomemcached#12](https://github.com/dustin/gomemcached/pull/12)\n  - Protocol should be tested against [mctest](https://github.com/victorkirkebo/mctest)\n\nCurrent implementation notes can be found in [wip.md](wip.md).\n\n## Want to use it?\n\nGreat! Please submit pull-requests and issues if you come across\nanything you think is wrong. Note that this is very much a WIP, and I\ngive no guarantees about support.\n\n## Why another memcached?\n\nCuckoo hashing is cool, and fast. Go is cool, and fast. Maybe the two\ncan outcompete the aging (though still very much relevant) memcached\nwhile keeping the code nice and readable. Furthermore, as the Go runtime\nimproves over time, cucache might itself get faster *automatically*!\n\nThe hope is that fine-grained write locking and lock-free reading might\nspeed up concurrent access significantly, and allow better scalability\nto many cores. While the traditional memcached wisdom of \"just shard\nyour data more\" works well most of the time, there comes a point where\nyou have some single key that is extremely hot, and then sharing simply\nwon't help you. You need to be able to distribute that keys load across\nmultiple cores. Although memcached does support multi-threaded\nexecution, the fact that it locks during reads is a potential scaling\nbottleneck.\n\n## Experimental results\n\ncucache is currently slightly slower than memcached in terms of\nover-the-network performance simply due to Go being slower than C for\nmany operations: network socket operations have more overhead, system\ncalls are slower, request and response marshalling is slower, and\ngoroutine scheduling and GC incur additional runtime cost. In terms of\npure performance (i.e. direct hash table operations), cuache is probably\nsignificantly faster than memcached already.\n\nSee [benchmark/](benchmark/) for more in-depth performance evaluation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fcucache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhoo%2Fcucache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fcucache/lists"}