sectasy0/zcached
sectasy0/zcached has 40 GitHub stars and 5 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-22 06:27 UTC. Last push 2026-11-18.
What you can do
- Zero-Dependency Architecture: Entirely built using Zig, ensuring seamless execution across systems with a Zig compiler, enhancing portability (except openssl, but it's optional).
- Lightweight Design: Engineered for efficiency, zcached boasts a small memory footprint and minimal CPU usage, optimizing performance while conserving resources.
- Optimized Efficiency: Prioritizing swift data handling, zcached ensures prompt operations to cater to diverse application needs.
- Diverse Data Type Support: Accommodates various data structures like strings, integers, floats, and lists, enhancing utility across different use cases.
Gemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
Über uns
Lightweight and efficient in-memory caching system akin to databases like Redis.
DatenREADME.md
Originalzcached - A Lightweight In-Memory Cache System
Welcome 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.
Introduction
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.
Crafted 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.
Features
- Zero-Dependency Architecture: Entirely built using Zig, ensuring seamless execution across systems with a Zig compiler, enhancing portability (except openssl, but it's optional).
- Lightweight Design: Engineered for efficiency,
zcachedboasts a small memory footprint and minimal CPU usage, optimizing performance while conserving resources. - Optimized Efficiency: Prioritizing swift data handling,
zcachedensures prompt operations to cater to diverse application needs. - Diverse Data Type Support: Accommodates various data structures like strings, integers, floats, and lists, enhancing utility across different use cases.
- Evented I/O and Multithreading: Leveraging evented I/O mechanisms and multithreading capabilities, zcached efficiently manages concurrent operations, enhancing responsiveness and scalability.
- TLS Support: Ensures secure data transmission with encryption, protecting data integrity and confidentiality during client-server communication.
Usage
While zcached lacks a CLI, you can utilize nc (netcat) from the terminal to send commands to the server.
SET
Set a key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.
echo "*3\r\n\$3\r\nSET\r\n\$9\r\nmycounter\r\n:42\r\nx03" | netcat -N localhost 7556
echo "*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
Command Breakdown:
*3\r\n- number of elements in the array (commands are always arrays)\$3\r\nSET\r\n-$3denotes the following string as 3 bytes long, SET is the command\$9\r\nmycounter\r\n-$9means that the next string is 9 bytes long,mycounteris the key:42\r\n-:indicates the next string is a number,42is the value
GET
Retrieve the value of a key. If the key doesn’t exist, -not found is returned. GET only accepts strings as keys.
echo "*2\r\n\$3\r\nGET\r\n\$9\r\nmycounter\r\n\x03" | netcat -N localhost 7556
PING
Returns PONG. This command is often used to test if a connection is still alive, or to measure latency.
echo "*1\r\n\$4\r\nPING\r\n\x03" | netcat -N localhost 7556
Running Tests
Run the tests using zig in the root directory of the project:
zig build test
Documentation
- For release history, see the release_history.md
- For building/installation process please refer to the installation.md
- For supported types and their encodings, see the types.md
- For supported commands, see the commands.md
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Ähnliche Projekte entdecken
Wird geladen…