Cache-busting and assets

@mathmax I may be mistaken, but it seems that server side caching by Grav and client side caching by the browser are a bit mixed-up in the discussion.

TL;DR: Enabling Grav’s Assets pipelines leads to cache busting.

I guess the OP is talking about busting the browser cache by renaming the resource (js, css), or by adding a querystring when a resource has changed. When the page is refreshed, the document contains references to the new resources. The browser can no longer use the css/js from cache and has to request the new css/js file from the server.

When enabling Grav’s Assets pipelines, cache busting will happen automatically. When the css/js pipelines are enabled, Grav will process the resources and if any file has changed, a new filename will be created. This will force the browser to fetch the new css/js file when the browser has refreshed the page from the server.

Renaming files are just one part of the whole. Cache expiration, caching directives and cache validators/validation are another part.

The following are a few good reads:

Hope this helps.