What does the "cache assets" feature of Nginx Proxy Manager actually do? reddit / selfhosted ---------------------------------------------------------------------- ODRAGR · 2023-10-05 09:29 Do you enable this feature by default for all your services? When does it make the most sense? What counts as an asset? ---------------------------------------------------------------------- selfh-sted · 2023-10-05 11:48 [Here's some context from the NPM GitHub discussions](https://github.com/NginxProxyManager/nginx-proxy- manager/issues/389#issuecomment-895485154) on the asset caching functionality. I don't personally use NGINX, but I'd also be interested in hearing why people might leverage that toggle vs letting their DNS provider (Cloudflare, etc.) manage caching for them. ---------------------------------------------------------------------- GolemancerVekk · 2023-10-05 13:06 Well for some people the DNS provider is just a DNS provider. Heck most people don't even use a specialized DNS provider, they let their registrar manage their zone 100%. Some service providers like Cloudflare, Bunny etc. happen to offer both DNS and CDN services and in that case you have some extra options, but you should consider them carefully. If caching is just "flip one switch and forget about it" you will be very tempted to turn it on. But everything comes with a cost; caching can have unintended consequences, it takes up disk space, or in the case of a public service it can take up cloud resources that can cost you money. Don't forget that you don't technically *need* server-side caching. Browsers themselves are perfectly capable of client-side caching static assets (images, css, js) based on their last modified timestamp. And even if you do server-side caching, for static assets it still boils down to reading one file; there isn't *that* much to gain; usually you just end up putting the burden on the proxy service rather than the app serice – admittedly that can be a plus in itself. Otherwise server-side caching should be enforced only if you suspect ill-behaving clients that don't do client-side caching on purpose. As for CDN, it's more than just caching, it replicates assets to datacenters that are physically closer to the visitors. It can also be used to deal with a sudden surge of first-time visitors who don't have any of your assets cached. ---------------------------------------------------------------------- [deleted] · 2023-11-06 15:46 [deleted] ---------------------------------------------------------------------- RedKomrad · 2023-11-30 16:37 caching assets that don't travel through the Internet. ie Home LAN or Intranet.