Recall & Review
beginner
What is response caching in Flask?
Response caching in Flask means saving the output of a web request so that future requests can be served faster without recalculating the response.
Click to reveal answer
beginner
Name two common types of response caching strategies.
1. Client-side caching: The browser stores responses to reuse.<br>2. Server-side caching: The server stores responses to send quickly.
Click to reveal answer
intermediate
How does Flask-Caching help with response caching?
Flask-Caching is an extension that makes it easy to store and retrieve cached responses on the server side using different backends like memory or Redis.
Click to reveal answer
intermediate
What HTTP headers are important for client-side caching?
Headers like
Cache-Control, Expires, and ETag tell browsers how long to keep a response and when to check for updates.Click to reveal answer
intermediate
Why should you be careful when caching dynamic content?
Because dynamic content changes often, caching it too long can show outdated information to users. You must set proper expiration or use cache invalidation.
Click to reveal answer
Which Flask extension is commonly used for server-side response caching?
✗ Incorrect
Flask-Caching provides tools to cache responses on the server side.
What does the HTTP header Cache-Control: max-age=3600 mean?
✗ Incorrect
max-age=3600 tells browsers to keep the cached response for 3600 seconds (1 hour).
Which caching strategy stores responses in the user's browser?
✗ Incorrect
Client-side caching means the browser saves responses to reuse later.
What is a risk of caching dynamic content too long?
✗ Incorrect
Caching dynamic content too long can cause users to see old data.
Which HTTP header helps browsers check if cached content has changed?
✗ Incorrect
ETag is a unique identifier for a response version, helping browsers validate cache freshness.
Explain how you would implement server-side response caching in a Flask app.
Think about installing Flask-Caching and using decorators to cache views.
You got /4 concepts.
Describe the difference between client-side and server-side caching and when to use each.
Consider where the cached data lives and what benefits each provides.
You got /6 concepts.