All challenges
Code AnalysisIntermediate 45s

Redis cache pattern

What pattern is this?
Starter code
const cached=await redis.get(key);if(cached)return JSON.parse(cached);
const data=await db.query();await redis.set(key,JSON.stringify(data),'EX',60);return data

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle