{"id":13996014,"url":"https://github.com/sectasy0/zcached","last_synced_at":"2025-04-23T03:31:53.892Z","repository":{"id":211932132,"uuid":"730304407","full_name":"sectasy0/zcached","owner":"sectasy0","description":"Lightweight and efficient in-memory caching system akin to databases like Redis.","archived":false,"fork":false,"pushed_at":"2025-02-22T10:08:28.000Z","size":5917,"stargazers_count":34,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T07:05:16.336Z","etag":null,"topics":["cache","database","key-value","nosql","zcached","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sectasy0.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-12-11T16:27:15.000Z","updated_at":"2025-03-20T03:05:18.000Z","dependencies_parsed_at":"2023-12-23T21:41:28.772Z","dependency_job_id":"5d54f9ad-923c-4241-a7be-f274faa19fe6","html_url":"https://github.com/sectasy0/zcached","commit_stats":null,"previous_names":["sectasy0/zcached"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectasy0%2Fzcached","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectasy0%2Fzcached/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectasy0%2Fzcached/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectasy0%2Fzcached/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sectasy0","download_url":"https://codeload.github.com/sectasy0/zcached/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365716,"owners_count":21418734,"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","database","key-value","nosql","zcached","zig"],"created_at":"2024-08-09T14:03:43.957Z","updated_at":"2025-04-23T03:31:53.886Z","avatar_url":"https://github.com/sectasy0.png","language":"Zig","readme":"# zcached - A Lightweight In-Memory Cache System\n\nWelcome to `zcached`, a nimble and efficient in-memory caching system resembling databases like Redis. This README acts as a comprehensive guide, aiding in comprehension, setup, and optimal utilization.\n\n![zig](https://img.shields.io/badge/Zig-v0.13-0074C1?logo=zig\u0026logoColor=white\u0026color=%230074C1)\n![tests](https://github.com/sectasy0/zcached/actions/workflows/zcached-tests.yml/badge.svg)\n![build](https://github.com/sectasy0/zcached/actions/workflows/zcached-build.yml/badge.svg)\n\n## Introduction\n`zcached` aims to offer rapid, in-memory caching akin to widely-used databases such as Redis. Its focus lies in user-friendliness, efficiency, and agility, making it suitable for various applications requiring swift data retrieval and storage.\n\nCrafted using Zig, a versatile, modern, compiled programming language, `zcached` prides itself on a zero-dependency architecture. This unique feature enables seamless compilation and execution across systems equipped with a Zig compiler, ensuring exceptional portability and deployment ease.\n\n## Features\n- **Zero-Dependency Architecture**: Entirely built using Zig, ensuring seamless execution across systems with a Zig compiler, enhancing portability (except openssl, but it's optional).\n- **Lightweight Design**: Engineered for efficiency, `zcached` boasts a small memory footprint and minimal CPU usage, optimizing performance while conserving resources.\n- **Optimized Efficiency**: Prioritizing swift data handling, `zcached` ensures prompt operations to cater to diverse application needs.\n- **Diverse Data Type Support**: Accommodates various data structures like strings, integers, floats, and lists, enhancing utility across different use cases.\n- **Evented I/O and Multithreading**: Leveraging evented I/O mechanisms and multithreading capabilities, zcached efficiently manages concurrent operations, enhancing responsiveness and scalability.\n- **TLS Support**: Ensures secure data transmission with encryption, protecting data integrity and confidentiality during client-server communication.\n\n## Usage\nWhile `zcached` lacks a CLI, you can utilize nc (netcat) from the terminal to send commands to the server.\n\n#### SET\nSet a key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.\n```bash\necho \"*3\\r\\n\\$3\\r\\nSET\\r\\n\\$9\\r\\nmycounter\\r\\n:42\\r\\nx03\" | netcat -N localhost 7556\n```\n\n```bash\necho \"*3\\r\\n\\$3\\r\\nSET\\r\\n\\$9\\r\\nmycounter\\r\\n%2\\r\\n+first\\r\\n:1\\r\\n+second\\r\\n:2\\r\\nx03\" | netcat -N localhost 7556\n```\n\n#### Command Breakdown:\n- `*3\\r\\n` - number of elements in the array (commands are always arrays)\n- `\\$3\\r\\nSET\\r\\n` - `$3` denotes the following string as 3 bytes long, SET is the command\n- `\\$9\\r\\nmycounter\\r\\n` - `$9` means that the next string is 9 bytes long, `mycounter` is the key\n- `:42\\r\\n` - `:` indicates the next string is a number, `42` is the value\n\n#### GET\nRetrieve the value of a key. If the key doesn’t exist, `-not found` is returned. GET only accepts strings as keys.\n```bash\necho \"*2\\r\\n\\$3\\r\\nGET\\r\\n\\$9\\r\\nmycounter\\r\\n\\x03\" | netcat -N localhost 7556\n```\n\n#### PING\nReturns `PONG`. This command is often used to test if a connection is still alive, or to measure latency.\n```bash\necho \"*1\\r\\n\\$4\\r\\nPING\\r\\n\\x03\" | netcat -N localhost 7556\n```\n\n## Running Tests\nRun the tests using `zig` in the root directory of the project:\n```bash\nzig build test\n```\n\n## Documentation\n- For release history, see the [release_history.md](docs/release_history.md)\n- For building/installation process please refer to the [installation.md](docs/installation.md)\n- For supported types and their encodings, see the [types.md](docs/internals/types.md)\n- For supported commands, see the [commands.md](docs/internals/commands.md)\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n","funding_links":[],"categories":["Zig"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsectasy0%2Fzcached","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsectasy0%2Fzcached","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsectasy0%2Fzcached/lists"}