All fields

“Caching Patterns” in Information Technology

31 questions across 5 technologies.

Information Technology

31 questions in 5 technologies

#QuestionTechnologyTopicLevel
1What is the write through caching pattern, and how does it differ from cache aside? Redis › Caching PatternsRedisCaching PatternsBeginner
2How does the read through caching pattern work, and how is it different from cache aside from the application's perspective? Redis › Caching PatternsRedisCaching PatternsIntermediate
3How do you decide which caching pattern, cache aside, write through, or write behind, is right for a specific application feature? Redis › Caching PatternsRedisCaching PatternsIntermediate
4How does Redis's data structure support (beyond simple key-value) enable caching patterns not possible with IMemoryCache? .NET › Caching (In-Memory, Distributed & Redis).NETCaching (In-Memory, Distributed & Redis)Advanced
5How would you implement cache-aside versus write-through caching patterns for a frequently-read, occasionally-written resource? ASP.NET Core › CachingASP.NET CoreCachingAdvanced
6What is the write behind, also called write back, caching pattern, and what risk does it introduce? Redis › Caching PatternsRedisCaching PatternsIntermediate
7What is the cache aside pattern, and how does it work with Redis? Redis › Caching PatternsRedisCaching PatternsBeginner
8How would you prevent a cache stampede, where many requests simultaneously try to regenerate the same expired cache entry at once? Redis › Caching PatternsRedisCaching PatternsAdvanced
9How do you implement cache invalidation correctly when the same underlying data is cached under multiple different keys? Redis › Caching PatternsRedisCaching PatternsAdvanced
10How does cache invalidation work, and why is deciding when to clear a cache often considered one of the harder problems in caching? PHP › Caching Strategies in PHPPHPCaching Strategies in PHPIntermediate
11How would you implement the Proxy pattern to add lazy initialization to an expensive-to-create object, and how does this differ structurally from the Decorator pattern despite both wrapping an object behind a shared interface? Java › Design Patterns in JavaJavaDesign Patterns in JavaAdvanced
12What are the fundamental differences between Redis and Memcached as caching solutions? Redis › Redis vs MemcachedRedisRedis vs MemcachedBeginner
13How do you configure and use Redis as a distributed cache in ASP.NET Core with StackExchange.Redis? .NET › Caching (In-Memory, Distributed & Redis).NETCaching (In-Memory, Distributed & Redis)Intermediate
14What is IDistributedCache, and how does it differ from IMemoryCache in a multi-instance deployment? .NET › Caching (In-Memory, Distributed & Redis).NETCaching (In-Memory, Distributed & Redis)Advanced
15How do you handle cache serialization for complex objects when using IDistributedCache, given it only natively supports byte[]? .NET › Caching (In-Memory, Distributed & Redis).NETCaching (In-Memory, Distributed & Redis)Advanced
16How would you decide between Redis and Memcached for a large scale application with a purely simple, high volume string caching requirement and no need for advanced features? Redis › Redis vs MemcachedRedisRedis vs MemcachedAdvanced
17How does the cache stampede problem occur, and what strategies help prevent it in a high traffic PHP application? PHP › Caching Strategies in PHPPHPCaching Strategies in PHPAdvanced
18What is Entity Framework Core, and how does it relate to the Repository and Unit of Work patterns? .NET › Entity Framework Core & Data Access.NETEntity Framework Core & Data AccessBeginner
19How would you design a custom annotation-driven caching mechanism (similar to Spring's @Cacheable) using a dynamic proxy combined with reflection? Java › AnnotationsJavaAnnotationsAdvanced
20How do you set an expiration time on a Redis key so it automatically gets deleted after a certain period? Redis › Expiration & EvictionRedisExpiration & EvictionBeginner
21What is the difference between the EXPIRE, TTL, and PERSIST commands in Redis? Redis › Expiration & EvictionRedisExpiration & EvictionBeginner
22How do you check the cache hit and miss ratio for a Redis instance being used as a cache, and why does this metric matter? Redis › Redis Monitoring & ObservabilityRedisRedis Monitoring & ObservabilityBeginner
23Does Memcached support data persistence the way Redis does with RDB and AOF? Redis › Redis vs MemcachedRedisRedis vs MemcachedBeginner
24What is the difference between the LRU and LFU eviction algorithms, and when would you choose one over the other? Redis › Expiration & EvictionRedisExpiration & EvictionIntermediate
25How do you subscribe to and handle a specific type of keyspace notification, such as being alerted whenever a key expires? Redis › Keyspace NotificationsRedisKeyspace NotificationsIntermediate
26How do you trim a Redis list to keep only a specific number of the most recent items, discarding older entries automatically? Redis › Lists in RedisRedisLists in RedisIntermediate
27How do you bind an interface to a specific concrete implementation within a service container, and why is this a common and valuable pattern? PHP › Dependency Injection & Service ContainersPHPDependency Injection & Service ContainersIntermediate
28How would you design configuration for a multi-tenant application where each tenant needs different settings resolved at runtime? .NET › Configuration & Options.NETConfiguration & OptionsAdvanced
29How do you choose between HashMap, LinkedHashMap, and TreeMap based on their different ordering guarantees and performance characteristics? Java › Collections FrameworkJavaCollections FrameworkAdvanced
30How would you build a reliable cache invalidation system using keyspace notifications, while accounting for their delivery limitations? Redis › Keyspace NotificationsRedisKeyspace NotificationsAdvanced
31How would you use a Bloom filter to prevent a cache stampede or unnecessary database lookups for items that definitely do not exist? Redis › RedisBloom (Probabilistic Data Structures)RedisRedisBloom (Probabilistic Data Structures)Advanced