Skills memory-cache
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.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/1999azzar/memory-cache" ~/.claude/skills/openclaw-skills-memory-cache && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/1999azzar/memory-cache" ~/.openclaw/skills/openclaw-skills-memory-cache && rm -rf "$T"
manifest:
skills/1999azzar/memory-cache/SKILL.mdsource content
Memory Cache
Standardized Redis-backed caching system for OpenClaw agents.
Prerequisites
- Binary:
must be available on the host.python3 - Credentials:
environment variable (e.g.,REDIS_URL
).redis://localhost:6379/0
Setup
- Copy
toenv.example.txt
..env - Configure your connection in
..env - Dependencies are listed in
.requirements.txt
Core Workflows
1. Store and Retrieve
- Store:
python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py set mema:cache:<name> <value> [--ttl 3600] - Fetch:
python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py get mema:cache:<name>
2. Search & Maintenance
- Scan:
python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py scan [pattern] - Ping:
python3 $WORKSPACE/skills/memory-cache/scripts/cache_manager.py ping
Key Naming Convention
Strictly enforce the
mema: prefix:
– Session state.mema:context:*
– Volatile data.mema:cache:*
– Persistent state.mema:state:*