Update caching

This commit is contained in:
Fred Boniface 2023-02-13 22:01:44 +00:00
parent a73c18e8ba
commit b56d073e2f
3 changed files with 9 additions and 3 deletions

View File

@ -39,7 +39,7 @@ http {
gzip_static on;
brotli_static on;
error_page 404 /404.html;
expires 3600;
expires 3d;
add_header Cache-Control "public, no-transform";
}
@ -52,6 +52,12 @@ http {
add_header Cache-Control "private, no-transform";
}
location /api/stats/ {
proxy_pass http://backend;
expires 20;
add_header Cache-Control "public, no-transform";
}
location /api/v1/list/ {
proxy_pass http://backend;
proxy_cache_key $scheme://$host$uri$is_args$query_string;

View File

@ -64,7 +64,7 @@
</div>
<!-- Footer -->
<footer>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - 0.1.3-test</p>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - 0.1.4-test</p>
</footer>
</body>
</html>

2
sw.js
View File

@ -1,6 +1,6 @@
/* Service Worker */
const appVersion = "0.1.3-test"
const appVersion = "0.1.4-test"
const cacheName = `owlboard-${appVersion}`
const cacheIDs = [cacheName]
const cacheFiles = [