rendertron icon indicating copy to clipboard operation
rendertron copied to clipboard

Document API call to drop the entire cache

Open rudolfbyker opened this issue 3 years ago • 2 comments

It would be very useful to have an API call to drop the entire cache. I would like to do that when deploying a new version of the app, because on every build, all JS and CSS files get new names (build hash), and the cached HTML in rendertron will still try to load the old JS files, resulting in a broken page. When a JS-aware bot hits such a page, it will fail to execute the JS.

rudolfbyker avatar May 12 '21 14:05 rudolfbyker

Hey @rudolfbyker

There is an API endpoint for this already, looks like it's not documented.

GET /invalidate

So basically the same as the documented api to remove a specific url, just without the /<url> bit

dwsmart avatar May 12 '21 15:05 dwsmart

Does the /invalidate endpoint also work with some kind of wildcard?

rudolfbyker avatar Sep 02 '21 13:09 rudolfbyker

In general, as we're deprecating the project, you should look into alternative approaches to rendering on the web.

AVGP avatar Oct 06 '22 07:10 AVGP