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.

Page Cache Configurations

Page cache lifetime

This sets the lifetime of the page cache. This is separate and different from the lifetime set for the combined files and other caching done in JCH Optimize. Whenever a page is cached, the cached version will be used until the lifetime expires, after which the plugin will allow Joomla! to generate the page again and the output is once more cached.

Platform specific

If the website is generating a different output for your mobile devices then you will need to enable this setting so that it will be cached separately from the desktop version. Most times you won't need to enable this as most modern websites use media queries to target different devices.

[Note]Note

Enabling this setting will automatically disable the Use HTTP Requests setting.

Exclude form users

Exclude urls

Sometimes some pages just don't work when cached because they may be always showing changing content. If this is not the same for all the pages on the website then you can simply exclude the offending page(s) from page caching by entering any part of the url here. Simply type or copy the search string in the textbox then click the Add item button to add it to the list then save your settings.

Exclude menu items

This setting provides another option for excluding pages but by using the existing menu items on your site. This dropdown list displays a hierarchical list of menu items on your site, simply select the menu items that you want to exclude from caching.

Storage Adapter

Storage adapters refers to available storage resources on your server such as memory or the filesystem. This is identical to the storage handlers in Global Configurations. There are currently two options, the Filesystem, which is the default, or Global, which uses whichever Storage handler is selected in Global Configurations.

The supported adapters are:

  • Filesystem
  • APCu
  • Memcached
  • Redis
  • WinCache

Only the handlers that are available for your server will be shown in Global Configurations.

Use HTTP Requests

Will generate static resources to return via HTTP request so pages are shipped without calling PHP again and significantly reduce server response time.

Integrate Mode Switcher

If enabled, then the System - JCH Optimize Page Cache plugin will be enabled/disabled when The JCH Optimize Mode Switcher Module is toggled between Production/Development respectively.