The System - JCH Optimize Page Cache Plugin

The System - JCH Optimize Page Cache plugin is used to cache the HTML page to reduce server response time. A significant part of server response is normally spent generating the HTML by the website. Usually the same HTML is produced for each page, or at least within a short span of time so significant savings in time can be gained by saving a static copy of the HTML and just outputting that to the browser rather than performing all the computations to generate the page on each request.

Just like The System - JCH Optimize Plugin , this plugin responds to the onAfterRender event but is ordered after so the HTML it accesses is the optimized HTML, and then it is saved in cache to be served on the next request. Logged-in users are automatically excluded from caching.

[Important]Important

It is highly recommended that you disable all other page cache plugins when using the JCH Optimize Page Cache Plugin to avoid conflicts. You usually don't need more than one Page Cache plugin anyway, for the most part they perform the same basic feature and using more than one don't yield better results.

If you choose to, you can always use another Page Cache plugin.

[Warning]Warning

If you're using another Page Cache plugin then you should set the lifetime to be less than the lifetime set for the combined files in the Combine CSS and JavaScript files on the General tab on The Options Page . This mitigates the chances of having links to combined files that have already expired and been deleted from still being cached on the page.

The plugin can be enabled/disabled by clicking the Page Cache button in the Basic Features section on The Dashboard

Page Cache Button

Enable or disable the Page Cache button on The Dashboard

This plugin is configured in the component on The Options Page using the settings on the Page Cache tab.

Page Cache Settings
Configure the System - JCH Optimize Page Cache plugin on the Options page of the component.

Noteworthy Features

HTTP Request

Even with caching enabled the website still does some computations to check for an available and valid cache to output instead of generating the page. Even though this is much quicker than generating the page each time, this feature pushes it a little further by performing this computation at the server level without calling PHP using Apache's module mod_rewrite. This significantly decreases server response, most times addressing this alert on Google Page Speed.

This feature is only available in the PRO version and is enabled in the Page Cache's configuration.

[Note]Note

This feature is automatically disabled if the Platform specific setting is enabled.

This feature sets a small cookie for logged-in users, so they can be excluded from caching.

Excluding Form Users

Normally when a user posts a form on the site, whether it be adding items in a shopping cart or submitting a contact form, the site normally generates specific content in response to the user's actions. Caching sometimes inhibits the viewing of such content and impedes the user from experiencing the site the way it was designed, thus forcing the site administrator to disable caching and generally forfeits the benefit of improved server response. This feature will exclude any user that has posted a form on the site from caching while the page remains cached for other guest users. That way the site will remain cached for a user who is just browsing but allows users who are interacted to have an unimpeded experience.

This works by setting a small cookie whenever a POST request is detected, indicating that the user has posted content to the site and most likely is expecting user specific responses so should be excluded from caching. This feature is enabled by default but can be disabled in the configurations in the event the particular site is making other POSTs requests not initiated by the user such as an Ajax request, and/or the site has no need to exclude form users.