0
0
Nginxdevops~10 mins

Cache-Control headers in Nginx - Interactive Code Practice

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

Complete the code to set Cache-Control header to no-cache.

Nginx
add_header Cache-Control "[1]";
Drag options to blanks, or click blank then click option'
Ano-cache
Bpublic
Cmax-age=3600
Dno-store
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'no-store' which prevents storing cache entirely.
Using 'max-age=3600' which allows caching for 1 hour.
2fill in blank
medium

Complete the code to set Cache-Control header to cache content for 1 hour.

Nginx
add_header Cache-Control "[1]";
Drag options to blanks, or click blank then click option'
Amax-age=3600
Bprivate
Cno-store
Dno-cache
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'no-cache' which disables caching.
Using 'private' which restricts caching to private caches only.
3fill in blank
hard

Fix the error in the Cache-Control header to make it public and cache for 10 minutes.

Nginx
add_header Cache-Control "[1]";
Drag options to blanks, or click blank then click option'
Ano-store, max-age=600
Bprivate, max-age=600
Cpublic, max-age=600
Dmax-age=600
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'private' which restricts caching to private caches.
Using 'no-store' which disables caching.
4fill in blank
hard

Fill both blanks to set Cache-Control header to no-store and no-transform.

Nginx
add_header Cache-Control "[1], [2]";
Drag options to blanks, or click blank then click option'
Ano-store
Bno-cache
Cno-transform
Dpublic
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'no-cache' instead of 'no-store'.
Using 'public' which allows caching.
5fill in blank
hard

Fill all three blanks to set Cache-Control header to private, max-age 300.

Nginx
add_header Cache-Control "[1], [2]=[3]";
Drag options to blanks, or click blank then click option'
Aprivate
Bmax-age
C300
Dmust-revalidate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'public' instead of 'private'.
Using 'max-age' without a value.