0
0
HLDsystem_design~10 mins

CDN caching for static content in HLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the cache expiration header for static content.

HLD
Cache-Control: max-age=[1]
Drag options to blanks, or click blank then click option'
Agzip
Bno-cache
Ctext/html
D3600
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'no-cache' disables caching, which is not desired for static content.
2fill in blank
medium

Complete the code to define the CDN edge server behavior for cache miss.

HLD
If cache miss, fetch content from [1]
Drag options to blanks, or click blank then click option'
Aclient browser
Banother CDN
Corigin server
Dlocal cache
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking the client browser provides content on cache miss.
3fill in blank
hard

Fix the error in the cache key definition for CDN caching.

HLD
Cache key = URL + [1]
Drag options to blanks, or click blank then click option'
Arequest headers
Bresponse body
Cserver logs
Dclient IP
Attempts:
3 left
💡 Hint
Common Mistakes
Including response body or server logs in cache key is incorrect.
4fill in blank
hard

Fill both blanks to configure CDN cache invalidation correctly.

HLD
To invalidate cache, send a [1] request to the CDN with the [2] URL.
Drag options to blanks, or click blank then click option'
APURGE
BGET
Ctarget
Dsource
Attempts:
3 left
💡 Hint
Common Mistakes
Using GET instead of PURGE for invalidation.
5fill in blank
hard

Fill all three blanks to define a cache-control header that allows CDN caching but forces revalidation after expiry.

HLD
Cache-Control: public, max-age=[1], [2], [3]
Drag options to blanks, or click blank then click option'
Amust-revalidate
B3600
Cproxy-revalidate
Dno-store
Attempts:
3 left
💡 Hint
Common Mistakes
Using no-store disables caching entirely.