Skill 2.3.1
Implement Azure Managed Redis data operations, including caching, expiration, and invalidation
Key Concepts
With the cache-aside pattern, the application first tries GET; on a miss it reads the database, then writes the value with SET key value EX 300 so that it expires after 300 seconds. Keys are named by convention, such as product:42, and values are serialized strings, hashes or JSON documents. Python clients use the redis-py library over TLS on port 10000, with Microsoft Entra authentication through the redis-entraid credential provider or with an access key.
Expiration bounds staleness: TTLs should reflect how quickly data changes, with small random jitter so that many keys do not expire at once. Invalidation removes or overwrites an entry when its source changes, for example in the code path that updates the database or in a handler for a change feed event. When memory is full, the eviction policy decides which keys are removed; volatile-lru evicts only keys with a TTL.