Cache Invalidation Pipeline is a data workflow that chains Redis + Supabase to automate a common task. When a Supabase row changes, the corresponding Redis cache key is automatically invalidated to keep your API fresh. Once configured, it saves ~4 hours/week of support tickets about stale data, plus elimination of coordinated deploy flushes and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.
When a Supabase row changes, the corresponding Redis cache key is automatically invalidated to keep your API fresh.
Hosted execution needs every MCP on the whitelist. Use the local CLI for this recipe until the missing MCPs are added.
Not yet hostable:
mcpizy recipe install redis-supabase-cache-invalidationSupabase Realtime fires the moment a row changes; Redis holds the cached API responses for that data. Connecting them means stale cache is never served — changes propagate instantly through your entire stack without any manual TTL tuning.
Update a row in Supabase. Users see stale data for up to 5 minutes due to cache TTL. Support tickets arrive. Clear cache manually.
Row updated → Redis cache invalidated in milliseconds → next request hits fresh data. Zero stale responses.
Concrete ROI — not marketing fluff.
Time saved
~4 hours/week of support tickets about stale data, plus elimination of coordinated deploy flushes
This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.
You are a cache-invalidation agent. Subscribes to Supabase Realtime.
Setup: subscribe to postgres_changes on tables in cache-map.yaml (table → key_patterns[]).
On each row change event (INSERT/UPDATE/DELETE):
1. Read event.table + event.record (and event.old_record if UPDATE)
2. For each key_pattern configured for this table, interpolate with row fields:
- product:{id} → product:42
- user:{id}:profile → user:7:profile
3. Call redis.unlink(keys=[...]) — UNLINK is non-blocking vs DEL
4. Also invalidate wildcard patterns via redis.scan + redis.unlink batches (100 at a time)
5. Log the invalidation: table, row_id, keys_invalidated_count, duration_ms to Supabase cache_invalidation_log
Never error out — log failures and continue (cache freshness is best-effort).How this workflow fires and what env vars you need.
Supabase Realtime: postgres_changes subscription on mapped tables (INSERT, UPDATE, DELETE)
Install everything — MCPs, prompt, env template — in a single call.
$ mcpizy recipe install redis-supabase-cache-invalidation ✓ Installs all 2 MCP servers ✓ Writes prompt to ~/.mcpizy/prompts/redis-supabase-cache-invalidation.md ✓ Generates .env.example in current directory ✓ Ready to paste into Claude Code
Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.
$ mcpizy install redis && mcpizy install supabaseSchedule a Firecrawl scrape of any website and store the structured results directly in a Supabase table for analysis.
Run Tavily searches on scheduled topics and index the results in Supabase for trend analysis and content research.
Parse your GitHub repos and build a Neo4j knowledge graph of files, functions, imports, and authors for code intelligence.
Query Parquet files directly from S3 using DuckDB without any ETL. Results are returned in seconds for ad-hoc analytics.
Cache Invalidation Pipeline is a data automation that uses Redis + Supabase together via the Model Context Protocol. When a Supabase row changes, the corresponding Redis cache key is automatically invalidated to keep your API fresh.
Setup takes around 15 min setup, sub-second cache invalidation. You install the required MCP servers with `mcpizy install redis && mcpizy install supabase`, connect your accounts, and the workflow is ready to run.
Once running, this workflow saves ~4 hours/week of support tickets about stale data, plus elimination of coordinated deploy flushes. The concrete business value: Removes 'my order shows wrong status' support tickets — cache is always fresh, support volume drops 10-20%; Enables aggressive caching (long TTLs) without staleness risk — API p95 latency drops 3-5x with zero tradeoffs.
You need 2 MCP servers: Redis (mcpizy install redis), Supabase (mcpizy install supabase). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.
Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.
Install the required MCPs from the marketplace and automate this in 15 min setup.
$ mcpizy install redis && mcpizy install supabase
Free to install. Connect your accounts and this workflow runs itself.