{"id":48490582,"url":"https://github.com/lalinsky/memcached.zig","last_synced_at":"2026-04-07T11:32:34.095Z","repository":{"id":337819398,"uuid":"1155325196","full_name":"lalinsky/memcached.zig","owner":"lalinsky","description":"Memcached client for Zig","archived":false,"fork":false,"pushed_at":"2026-02-11T13:15:11.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-11T20:57:41.040Z","etag":null,"topics":["async","memcached","memcached-client","zig","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/lalinsky.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-11T11:38:24.000Z","updated_at":"2026-02-11T14:07:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lalinsky/memcached.zig","commit_stats":null,"previous_names":["lalinsky/memcached.zig"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lalinsky/memcached.zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalinsky%2Fmemcached.zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalinsky%2Fmemcached.zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalinsky%2Fmemcached.zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalinsky%2Fmemcached.zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lalinsky","download_url":"https://codeload.github.com/lalinsky/memcached.zig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalinsky%2Fmemcached.zig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31511642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["async","memcached","memcached-client","zig","zig-package"],"created_at":"2026-04-07T11:32:32.374Z","updated_at":"2026-04-07T11:32:34.084Z","avatar_url":"https://github.com/lalinsky.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# memcached.zig\n\nA memcached client library for Zig, built on [zio](https://github.com/lalinsky/zio) for async I/O. Uses the modern [meta protocol](https://docs.memcached.org/protocols/meta/) for efficient communication.\n\n## Features\n\n- Async I/O via zio coroutines\n- Connection pooling per server\n- Multi-server support with consistent hashing (rendezvous)\n- Meta protocol (mg, ms, md, ma commands)\n- CAS (compare-and-swap) support\n- TTL and flags support\n\n## Example\n\n```zig\nconst std = @import(\"std\");\nconst zio = @import(\"zio\");\nconst memcached = @import(\"memcached\");\n\npub fn main() !void {\n    var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n    defer _ = gpa.deinit();\n\n    var rt = try zio.Runtime.init(gpa.allocator(), .{});\n    defer rt.deinit();\n\n    var client = try memcached.connect(gpa.allocator(), \"localhost:11211\");\n    defer client.deinit();\n\n    // Set a value\n    try client.set(\"hello\", \"world\", .{ .ttl = 300 });\n\n    // Get a value\n    var buf: [1024]u8 = undefined;\n    if (try client.get(\"hello\", \u0026buf, .{})) |info| {\n        std.debug.print(\"Value: {s}\\n\", .{info.value});\n    }\n\n    // Increment a counter\n    try client.set(\"counter\", \"0\", .{});\n    const val = try client.incr(\"counter\", 1);\n    std.debug.print(\"Counter: {d}\\n\", .{val});\n}\n```\n\n## Multi-server\n\n```zig\nvar client = try memcached.Client.init(gpa.allocator(), .{\n    .servers = \u0026.{\n        \"server1:11211\",\n        \"server2:11211\",\n        \"server3:11211\",\n    },\n    .hasher = .rendezvous,\n});\ndefer client.deinit();\n```\n\n## Installation\n\nAdd memcached.zig as a dependency in your `build.zig.zon`:\n\n```bash\nzig fetch --save \"git+https://github.com/lalinsky/memcached.zig\"\n```\n\nIn your `build.zig`:\n\n```zig\nconst memcached = b.dependency(\"memcached\", .{\n    .target = target,\n    .optimize = optimize,\n});\nexe.root_module.addImport(\"memcached\", memcached.module(\"memcached\"));\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalinsky%2Fmemcached.zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flalinsky%2Fmemcached.zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalinsky%2Fmemcached.zig/lists"}