An OpenClaw extension that provides in-memory page snapshot caching with LRU eviction (max 50 entries) and TTL (5-minute expiry). Version 2026.21.1 ships TypeScript types, uses ESM only, and targets Node.js 22+. It exports three tools (page_snapshot_cache, page_cache_stats, page_cache_clear) for caching page snapshots and role references. Unlike generic caches, this integrates natively with OpenClaw's plugin SDK and AI-driven Web UI, offering hit-rate statistics and automatic cleanup. The cache is not persistent and resets on process restart.
npm install page-action-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates instantiation, storing, retrieving, statistics, and clearing of the page cache.
Use a persistent caching solution (e.g., Redis) if data durability is required.
Monitor cache usage and adjust the LRU limit if needed (not configurable).
If custom TTL is needed, consider forking or wrapping the package.
Upgrade Node.js to 22+ or use an older version of the package if available.
Manually invalidate cache entries when content is updated.
Use import statement in an ESM environment, or convert your project to ESM by adding 'type': 'module' in package.json.
Use named import: import { PageActionCache } from 'page-action-cache'.Install the SDK: npm install openclaw/plugin-sdk.
Upgrade Node.js to version 22 or higher.