{"repo":"Vesal-J/gocache","free":true,"listed":false,"github":"https://github.com/Vesal-J/gocache","clone":"git clone https://github.com/Vesal-J/gocache.git","description":"A lightweight in-memory cache server implementation inspired by Redis, written in Go.","language":"Go","stars":25,"topics":["cache","golang","redis"],"license":null,"category":"databases-storage","readme_excerpt":"GoCache - Redis Clone in Go A in-memory cache server implementation inspired by Redis, written in Go and compatible with Redis clients, clis and etc, this project built just for fun 😊 Features - TCP server implementation - In-memory key-value storage - Support for TTL (Time To Live) on keys - Concurrent connections handling - Thread-safe operations - Supports RESP (Redis Serialization Protocol) Installation Usage Starting the Server The server will start listening on port 6380 by default. Connecting to the Server Since GoCache uses RESP (Redis Serialization Protocol), you should use redis-cli to connect to the server: Or connect to a specific host: Example Commands Once connected with redis-cli, you can use standard Redis commands: Using with Other Redis Clients Since GoCache implements the RESP protocol, it's compatible with most Redis clients: - Python : redis-py - Node.js : redis or ioredis - Java : Jedis - C# : StackExchange.Redis Example with Python: Architecture - internal/core/app.go - Main application logic and TCP server implementation - internal/store - In-memory storage implementation with TTL support - internal/command - Command handlers (GET, SET, etc.) - internal/core/router.go - Command routing and processing - internal/utils - RESP protocol utilities Features 1. Concurrent Connections : Uses goroutines to handle multiple client connections 2. TTL Support : Automatic key expiration with background cleanup 3. Thread-safe Operations : Uses mutex for safe concurr","default_branch":null,"files":null,"tree":[],"storefront":"/r/Vesal-J","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Vesal-J/gocache/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}