Skip to content

Instantly share code, notes, and snippets.

@felipekm
Created February 28, 2025 13:53
Show Gist options
  • Save felipekm/ae95d0d059ca33402b9abe1a258a3116 to your computer and use it in GitHub Desktop.
Save felipekm/ae95d0d059ca33402b9abe1a258a3116 to your computer and use it in GitHub Desktop.
Caching for Performance - Reduce API load and speed up responses by caching frequent requests
server {
location /api/ {
proxy_cache cache_zone; # Enable caching for responses
proxy_cache_valid 200 10m; # Cache 200 OK responses for 10 min
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment