ix-cache

Official

Efficient Redis-like caching in your processes

AuthorGuitarAlchemist
Version1.0.0
Installs0

System Documentation

What problem does it solve?

ix-cache solves the problem of needing an efficient in-memory key-value store for applications that require caching, TTL-based expiry, LRU eviction, pub/sub messaging, or a lightweight Redis-compatible RESP server.

Core Features & Use Cases

  • Key-Value Store: Offers concurrent sharded HashMap with set, get, delete, keys operations.
  • TTL Management: Time-to-live expiry for keys to maintain cache freshness.
  • LRU Eviction: Implements LRU eviction when the cache reaches its capacity.
  • Pub/Sub Messaging: Provides in-process publish/subscribe channels for real-time updates.
  • RESP Server: Offers a Redis-compatible protocol server for integrating with other Redis clients.
  • Persistence: Allows snapshotting to disk for data preservation and can restore from these snapshots on startup.

Quick Start

To get started, create an instance of the Cache and set a key with a TTL, then retrieve it:

use ix_cache::{Cache, CacheConfig};

let cache = Cache::new(CacheConfig::default());
cache.set("key", &json!("value"), Some(std::time::Duration::from_secs(10)));
if let Some(value) = cache.get("key") {
  println!("Value retrieved: {:?}", value);
}

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ix-cache
Download link: https://github.com/GuitarAlchemist/ix/archive/main.zip#ix-cache

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.