OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: Brashquido on May 27, 2025, 01:02:49 PM

Title: NGINX Caching Setup?
Post by: Brashquido on May 27, 2025, 01:02:49 PM
Hi All

Just wondering if anyone had knowledge on how to correctly setup NGINX so that it caches responses?

What I've tried.

Looking at the cache directory and it is empty. I'm trying to cache a Wordpress site if that is of any relevance. Really appreciate any tips here as caching will be great to have in place for performance as well as keeping content up for short periods while any backend service maintainance is going on.
Title: Re: NGINX Caching Setup?
Post by: Monviech (Cedrik) on May 27, 2025, 06:32:02 PM
Since Wordpress serves dynamic content based on php+sql, every user agent will get a personally rendered html of that website.

You cannot really cache dynamic content properly in a reverse proxy since it is individual per request, only static content could be cached properly and served even if backend servers are offline.
Title: Re: NGINX Caching Setup?
Post by: Patrick M. Hausen on May 27, 2025, 06:39:13 PM
If you want a cache in front of a CMS you really should consider varnish-cache.org.