π¦ ClawHub
Memory Cache
by @1999azzar
High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and JSON serialization for session context and API...
TERMINAL
clawhub install memory-cacheπ About This Skill
name: memory-cache description: High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and session context caching. Use for: (1) Saving agent state, (2) Caching API results, (3) Sharing data between sub-agents. metadata: {"openclaw":{"requires":{"bins":["python3"],"env":["REDIS_URL"]},"install":[{"id":"pip-dependencies","kind":"exec","command":"pip install -r requirements.txt"}]}}
Memory Cache
Standardized Redis-backed caching system for OpenClaw agents.
Prerequisites
python3 must be available on the host.REDIS_URL environment variable (e.g., redis://localhost:6379/0).Setup
1. Copyenv.example.txt to .env.
2. Configure your connection in .env.
3. Dependencies are listed in requirements.txt.Core Workflows
1. Store and Retrieve
python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py set mema:cache: [--ttl 3600] python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py get mema:cache:2. Search & Maintenance
python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py scan [pattern]python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py pingKey Naming Convention
Strictly enforce themema: prefix:
mema:context:* β Session state.mema:cache:* β Volatile data.mema:state:* β Persistent state.βοΈ Configuration
1. Copy env.example.txt to .env.
2. Configure your connection in .env.
3. Dependencies are listed in requirements.txt.