Open yaitskov opened 2 years ago
What is wrong with CDN caching? Is it not good enough? I hope it works.
E.g.
% curl -D - https://hackage.haskell.org/package/base-4.16.0.0/docs/Control-Concurrent-QSemN.html|less
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 5972
Server: nginx/1.18.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=86400
ETag: "f660245f1a3d53b216f7805264349d7e"
Says "cache me for a day". Maybe that could be longer for (older) docs though.
I think that caching like this should be integrated in downstream tooling rather thank hackage-server itself.
What is wrong with CDN caching? Is it not good enough? I hope it works.
E.g.
% curl -D - https://hackage.haskell.org/package/base-4.16.0.0/docs/Control-Concurrent-QSemN.html|less % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 200 OK Connection: keep-alive Content-Length: 5972 Server: nginx/1.18.0 (Ubuntu) Content-Type: text/html; charset=utf-8 Cache-Control: public, max-age=86400 ETag: "f660245f1a3d53b216f7805264349d7e"
Says "cache me for a day". Maybe that could be longer for (older) docs though.
Service worker cache is better than server side cache, because it is working offline when you are on a flight e.g. and it is faster. Page can be safely closed and opened in a few days in complete offline. Today's hackage outage lasted for 15 minutes for me. I was observing 503 and had time for a dinner.
Hi,
Today I noticed that hackage.haskell.org was down for quiet awhile.
I wasn't able to use doc packages opened by vscode+HLS.
I propose to enable service worker browser caching. This way docs would be available offline after user visit package docs once.