feat(cache): add Cache-Control middleware and update .env.example

This commit is contained in:
Abdelaziz Mahdy
2024-12-22 15:32:56 -04:00
parent 2d5377cbc5
commit f1f5db84f9
3 changed files with 23 additions and 0 deletions
+6
View File
@@ -23,3 +23,9 @@ ANIWATCH_API_MAX_REQS=70
# env to use optional redis caching functionality
ANIWATCH_API_REDIS_CONN_URL=<rediss://default:your-secure-password@your-redis-instance-name.provider.com:6379>
# Cache-Control settings for Vercel Edge Caching
# s-maxage specifies the maximum amount of time a resource is considered fresh when served by a CDN cache
S_MAXAGE=60
# stale-while-revalidate specifies the amount of time a resource is served stale while a new one is fetched
STALE_WHILE_REVALIDATE=30