Full Page Cache
"Full page cache" means that the entire HTML output for the page will be cached. Subsequent requests for the page will return the cached HTML instead of trying to process and re-build the page, thus returning a response to the browser much faster.
For most websites it will be a significant performance boost to enable the full page cache.
Enable the full page cache on Pages.
How the Full Page Cache is Cleared Automatically
When branchCMS is building out a page every element that goes into building the page is tagged in the cache. This enables us to clear the full page cache anytime any of those elements are updated.
For example, if a new navigation item is added to a navigation menu then any page that uses that navigation menu will have it's full page cache cleared.
Another example could be if a page has a Blog API feed on it that displays the 3 most recent blog posts. If a new blog post is added the the full page cache for that page will be cleared so that it can show the new blog post. Or, if the blog content template is updated that will also clear the appropriate full page caches.
And of course if you edit a page it's full page cache is cleared.
You should not have to worry about clearing the cache when updating other elements of your website.
GET and POST Request Caching
If the full page cache is enabled for a page then all GET requests will be uniquely cached. This means that if the URL contains any URL parameters then a unique cache will be saved for that request. Subsequent requests with the same GET parameters will use the new cache based on those URL parameters.
By default if a page receives a POST request then the full page cache will be ignored so that the POST data can be processed. You do have the option to enable caching for POST requests for pages.
When Not to Enable the Full Page Cache
If your templates include any content that could change based on user input or if a customer is logged into your website then you may not want to use the full page cache on those pages.
Some examples include:
- An ecommerce website that displays the contents of their shopping cart in the header of a page.
- Navigation items that only show up for logged in accounts.
- A password protected page that shows content specific to the user.
If you include time sensitive feeds (like a Calendar Upcoming Events API or an external RSS feed) then you might still be able to use a full page cache - just set the cache timeframe to be one day or less.