Hands-on task
Cache backend responses
nginx proxies requests to the backend http://127.0.0.1:8800. Enable caching of backend responses on the nginx side and add an X-Cache-Status header that shows cache hits. Different URLs (including ones with different query parameters) are cached separately: the first request to a new URL goes to the backend (X-Cache-Status: MISS), and a repeated one is served from the cache (HIT). The page content must stay the same.
- nginx
- proxy_cache
- proxy_cache_path
- upstream_cache_status
- caching