frappe-cache

frappe-cache is a command for Claude Code from Venkateshvenki404224/frappe-apps-manager. It costs 15 tokens per session (2,135 once invoked), scanned B, original, MIT.

A command workflow for managing the Redis cache used by Frappe, a web application framework. It supports clearing, inspecting, monitoring, and reviewing cache statistics.

In plain words
What is it for?
Clearing all, user-specific, DocType-specific, or selected cache entries; viewing memory and hit/miss statistics; inspecting keys; and monitoring cache performance in a Frappe bench.
Why use it?
It helps diagnose stale or inefficient cached data and check whether Redis is working correctly.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frappe-apps-manager plugin — 16 skills, 16 commands, 3 hooks shipped together

Good fit Clearing all, user-specific, DocType-specific, or selected cache entries; viewing memory and hit/miss statistics; inspecting keys; and monitoring cache performance in a Frappe bench.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/venkateshvenki404224/frappe-apps-manager/frappe-cache
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Venkateshvenki404224/frappe-apps-manager

Made for: Claude Code.

Or install frappe-apps-manager, the plugin that ships this one along with the rest of its 16 skills, 16 commands, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frappe-cache

README.md
[![agentmods](https://agentmods.dev/badge/commands/venkateshvenki404224/frappe-apps-manager/frappe-cache/github.svg)](https://agentmods.dev/commands/venkateshvenki404224/frappe-apps-manager/frappe-cache)
Your own site
<a href="https://agentmods.dev/commands/venkateshvenki404224/frappe-apps-manager/frappe-cache"><img src="https://agentmods.dev/badge/commands/venkateshvenki404224/frappe-apps-manager/frappe-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frappe-cache

Your own site · 80×15
<a href="https://agentmods.dev/commands/venkateshvenki404224/frappe-apps-manager/frappe-cache"><img src="https://agentmods.dev/badge/commands/venkateshvenki404224/frappe-apps-manager/frappe-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.02135
Opus 5 $0.00008 $0.01068
Sonnet 5 $0.00003 $0.00427
Haiku 4.5 $0.00002 $0.00214

Measured 12d ago against content hash a4db0139f4d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

frappe-cache scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo systemctl restart redis-server
frappe-apps-manager/commands/frappe-cache.md · 380 lines

How it starts

The opening of the file, as written. The whole thing — 380 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frappe Cache Command

Manage Frappe's Redis cache including clearing cache, monitoring cache statistics, and optimizing cache performance.

Steps to Execute

1. Verify Environment

  • Check if in valid Frappe bench
  • Verify Redis is running: redis-cli ping
  • Check site exists

2. Cache Operation Selection

Ask user what cache operation they want:

A. Clear Cache

  • Clear all cache
  • Clear specific doctype cache
  • Clear user-specific cache
  • Clear specific cache keys

B. View Cache Stats

  • Cache size and memory usage
  • Hit/miss ratio
  • Key count
  • Expiration info

C. Inspect Cache

  • List cache keys
  • View specific key values
  • Search cache keys by pattern

D. Monitor Cache

  • Real-time cache monitoring
  • Performance metrics
  • Memory usage trends

3. Clear Cache Operations

Clear All Cache:

bench --site [site-name] clear-cache

Clear Specific DocType:

bench --site [site-name] console
>>> frappe.clear_cache(doctype='Customer')
>>> exit()

Clear User Cache:

# Via console
bench --site [site-name] console
>>> frappe.clear_cache(user='[email protected]')

Clear Specific Keys:

# Via Redis CLI
redis-cli --scan --pattern "*customer*" | xargs redis-cli del

4. Cache Statistics

View Cache Info:

redis-cli info memory
redis-cli info stats

Display formatted output:

Memory Usage: 45.2 MB / 512 MB (8.8%)
Total Keys: 1,247
Hit Rate: 87.3%
Evictions: 12

Key Count by Pattern:

# Count DocType cache keys
redis-cli --scan --pattern "*doctype*" | wc -l

# Count user cache keys
redis-cli --scan --pattern "*user*" | wc -l

5. Cache Inspection

List Recent Keys:

redis-cli --scan --pattern "*" | head -20

View Key Value:

redis-cli get "cache_key_name"

Check Key TTL:

redis-cli ttl "cache_key_name"

Search Keys:

# Find keys matching pattern
redis-cli --scan --pattern "*customer*"

6. Cache Monitoring

Read the full file on GitHub · 380 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 380 lines · 15 tokens per session scan B a4db0139f4d5

Subscribe to this mod's changes

frappe-cache is a command published in the GitHub repository Venkateshvenki404224/frappe-apps-manager (27 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 2,135 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.