Specialized in solving caching architecture problems: cache penetration, stampede/thundering herd, and in-memory vs distributed cache tradeoffs. Delegates to @problems.
Ships in coding-interview-agent. Installing the plugin adds it to Claude Code.
This document contains the complete problem bank with solutions and walkthroughs for the Caching Architecture interviewer skill.
Question: "Attackers are requesting user profiles for User IDs that don't exist (e.g., ID=999999). It misses the cache, hits the database, returns null, and doesn't get cached. Our DB is being overwhelmed. How do we fix this?"
Root Cause: Non-existent keys bypass the cache entirely and always hit the database.
Solution 1 - Cache Negative Results:
Cache the key user:999999 with a value of NULL and a short TTL (e.g., 30 seconds). This prevents repeated lookups for the same non-existent key.
Solution 2 - Bloom Filter: A Bloom Filter is a highly memory-efficient data structure that can tell you with 100% certainty if an item does not exist. Put it in front of the cache. If the filter says "Not exists", immediately return 404 without hitting Redis or the DB.
Key Concepts:
user:999999 with a value of NULL and a short TTL (e.g., 30 seconds)."Question: "A highly popular item's cache key expires. 5,000 concurrent requests hit the API, all get a cache miss, and all query the database simultaneously. The DB crashes. How do we prevent this?"
Root Cause: TTL expiration on a hot key causes all concurrent readers to simultaneously fall through to the database.
Ideal Answer:
Implement a Mutex/Lock. When a cache miss occurs, the thread attempts to acquire a Redis lock for lock:item_123. The thread that gets the lock queries the DB and updates the cache. The other threads wait 50ms and check the cache again.
Alternative: Use "Probabilistic Early Expiration" where threads randomly decide to refresh the cache before it actually expires.
Key Concepts:
Question: "Should we use an in-memory cache (like a ConcurrentHashMap in our Java app) or a distributed cache (like Redis)?"
Ideal Answer: Use a multi-level cache (L1/L2). Put a small, fast in-memory cache (L1) in the app with a very short TTL (e.g., 5 seconds) to handle massive spikes. Fall back to a larger Distributed Cache (L2, Redis) for global consistency, then fall back to the DB.
Key Concepts:
Question: "Two threads are updating the same user's profile simultaneously. Thread A updates the DB to V2 and then sets the cache to V2. Thread B reads the DB (gets V1 due to timing) and sets the cache to V1 after Thread A. Now the cache holds stale data. How do you prevent this?"
Ideal Answer: Always DELETE the cache key on writes, never SET. Let the next reader populate it via Cache-Aside. This eliminates the race condition because the worst case is an extra cache miss, not stale data.
Key Concepts:
"Hey, glad to have you here! Let's jump right in. We have a slow API endpoint that aggregates user stats -- things like total posts, follower count, and engagement metrics. Response times are around 2 seconds. How would you speed this up?"
Generate scorecard based on the Evaluation Rubric. Highlight strengths, improvement areas, and recommended resources.
What the agent file sets; muted values are Claude Code's defaults
7-day visitors to each agent page
@agent-coding-interview-agent:systems-design:caching-architecture-interviewer:references:problemsfrom coding-interview-agent
npx claudepluginhub preplabsai/interviewmentor --plugin coding-interview-agent135 agents in this plugin
ai-pm:ai-product-strategy-interviewer:references:problemsAI Product Strategy -- Scenario Bank & Detailed Walkthroughs---ai-pm:ai-product-strategy-interviewer:references:remotion-componentsRemotion Animation ComponentsThese are React (Remotion) components for creating animated visualizations of AI product strategy concepts. They are reference implementations for building educational content -- not rendered in CLI or chat interfaces.ai-pm:ai-product-strategy-interviewer:ai-product-strategy-interviewerai-product-strategy-interviewerA VP of Product interviewer that simulates a product strategy interview focused on AI-native products. Use this agent when you want to practice AI product sense, defining success metrics for AI features, managing uncertainty in AI UX, building AI product roadmaps, and making cost-quality trade-offs. This is NOT a technical ML interview -- it evaluates product thinking applied to AI.ai-pm:prompt-engineering-interviewer:references:problemsPrompt Engineering & LLM Architecture -- Scenario Bank & Detailed Walkthroughs---ai-pm:prompt-engineering-interviewer:references:remotion-componentsRemotion Animation ComponentsThese are React (Remotion) components for creating animated visualizations of prompt engineering and RAG concepts. They are reference implementations for building educational content -- not rendered in CLI or chat interfaces.ai-pm:prompt-engineering-interviewer:prompt-engineering-interviewerprompt-engineering-interviewerA Senior AI Engineer interviewer that simulates a technical interview focused on prompt engineering and LLM architecture at scale. Use this agent when you want to practice prompt pipeline design, RAG architecture, evaluation frameworks, token optimization, and edge case handling. This evaluates engineering rigor and systematic thinking, not prompt tricks or creative prompting.Other plugins' agents for the same job