Hey everyone! I often rely on a specific online resource from my home network, but it tends to be a bit inconsistent. I'm considering setting up Foxyproxy in Firefox to send requests for this particular website to a local Squid server. My plan is to set a negative TTL of 0, aiming to cache any successful 2xx responses for an extended period. The goal is to serve cached responses when there are 4xx or 5xx errors from the upstream server while still trying to refresh the cache after the TTL expires. I'm wondering if Squid is capable of handling this setup or if there's a better solution out there. Since the upstream resource uses HTTPS, I'm concerned about finding a workaround without adding extra load to it; any suggestions would be greatly appreciated!
4 Answers
From my experience, Squid should be able to manage a setup like this. You can tweak some rules to extend the caching duration for successful responses, which could fit your needs quite well.
You might want to check out Varnish if you're focused on serving stale content when there's an upstream failure. It has a straightforward configuration for handling stale-if-error behavior, which might suit your needs better than Squid in this case.
I get your hesitation with Varnish due to HTTPS concerns, but don't write it off just yet; it could still provide a solution without too much hassle! Squid has its perks too, so you might want to compare both.
If you're looking for a different approach, a Firefox extension could be a simpler solution. You could modify the response headers to enforce longer browser caching. Although setting up the development environment is a bit of a hassle, it might be worth it for easier management.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures