New feature: Republishing

One thing we pay a lot of attention to with Perch is page load performance. We want your Perch-based site to be as fast as possible, and put as little strain on your web server as it can. To help with that, when a content region is saved, we add the content to your template and store the result as a block of pre-compiled HTML.

This means that when your web page loads, Perch just needs to fetch this block of cached HTML and add it to the page. All the hard work is done at edit time when you click Save (which is fairly infrequent) making for easy work when the page is displayed (which happens a lot more). This keeps your site nice and fast.

It’s not without its downsides, however. If you have lots of regions using the same template and you then want to make a change to the template, those regions won’t pick up the change until they are next saved. That could leave you needing to click around your entire site saving things, which is the sort of job computers are supposed to save us from.

This is where republishing comes in. As a new feature in Perch 2.2.1 — under Pages, Add/Edit, Republish — republishing does the same job as clicking Save on every region of your site. It goes through each page and recompiles each region’s content with the current version of its template, and caches the result. If you have a larger site with lots of pages, this could be quite a bit of work for your server to carry out, so it might take a moment to complete.

That’s it – it’s just like clicking Save on each region of your site. We hope you find it useful.