JOOMLA! 5 JOOMLA! 4 JOOMLA! 3 FREE PRO

Page Cache Extended - Joomla! Plugin - Logo Name: Page Cache Extended (PCE)
Version: 5.2.1.0-PRO (Joomla! 5) / 4.2.2.0-PRO (Joomla! 4) / 3.5.9.1-PRO (Joomla! 3)
Type: Plugin
License: GPLv3
Description: Page Cache Extended provides page cache with many useful features. The plugin improves the page loading time and gives you more control of the cached pages.
Download: PCE - Page Cache Extended Downloads

With Page Cache Extended you can improve the page loading time significantly!

Page Cache Extended generates copies of the rendered pages and loads the entire output on further requests from the previously generated cache files. By loading the content from static files, no database queries have to be processed. This improves the loading speed greatly!

This plugin is based on the core plugin "Page Cache" but was extended with useful features. You can specify which pages should be cached with the help of an exclusion list for components and URLs. It is also possible to use the list like a white list to include the selected components or URLs.

The HTML code in the cached files can be minified to improve the loading speed even further. HTML comments (e.g. copyright references) can be kept in the optimized code. In addition, you can set a specific cache time independent of the global cache time which can be set in the Global Configuration.

PCE saves the complete HTML output additionally already compressed in the gzip format as a separated file. If the browser of the visitor supports the gzip encoding, then the data can be returned immediately without the time consuming compression process.

The plugin supports the clearing of the cache directly in the frontend by a self-defined token. Individual pages can be specifically updated by entering the token in the URL. Thus, not all cached pages need to be purged completely.

Page Cache Extended, in combination with Device Specific Content (DSC), can create device-specific cache files (mobile, tablet and desktop). For this, DSC simply has to be installed additionally. PCE automatically detects the installation and uses DSC to create device-specific static files.

Features

  • Complete pages are cached to increase loading performance
  • Caching process can be excluded for specified menu entries, components, URLs and cookie (partly PRO)
  • Toggle selection - entered data are not excluded, but included
  • Cache files can be minified to decrease loading time
  • Individual cache time for the static files
  • Browser cache mechanism can be used
  • Static files are additionally saved in the gzip format
  • Cache of specific pages can be cleaned directly in the frontend with the help of a token
  • Individual pages can be cached device-specific (Device Specific Content plugin required)
  • Language: German and English

Installation

Install PCE with the help of the installer component as usual. Then activate the plugin in Extensions -> Plugins -> System - PCE - Page Cache Extended. Use the options in the "Settings" tab to adjust the plugin for your needs!

The plugin stores the static files in the folder cache/pce and the files in gzip format in cache/pce-gzip.

Clean cache in the frontend

Enter a value in the option "Clean Cache Token" to activate the frontend cache cleaning feature. Clean the cache of the loaded page in the frontend by adding ?cleancache=TOKEN to the URL in the address bar - replace TOKEN with your self-defined token!

Please note:

  1. Make sure to disable Joomla!'s cache plugin "System - Page Cache". You cannot use both plugins at the same time!
  2. The cached pages are only provided to guest visitors, not to logged in users. Users always see the current, not cached state of the website.
  3. If you use the SEF functionality, then the plugin must be ordered after the SEF plugin "System - SEF" (just like the core cache plugin). Tip: Select the value "Order Last" in the settings in the Ordering dropdown.

Performance Mode - HTML Output Caching Based on SEF URLs

Page Cache Extended introduces a powerful new feature: Performance Mode. This feature allows a page's entire HTML output to be cached and stored based on its SEF (Search Engine Friendly) URL structure. The plugin generates cache files for each unique SEF URL in the frontend cache folder when enabled.

These cache files can then be served directly by the web server without involving Joomla!'s PHP processing, resulting in significantly improved performance and reduced server load. By leveraging pre-configured web server rules, the cached HTML can instantly be delivered to the user if a matching cache file exists.

Copy the following .htaccess rules to the top of your .htaccess file and apply them to your web server configuration. These rules handle the direct serving of cache files based on the SEF URL.

.htaccess rules to enable direct server processing

# Page Cache Extended Pro - PCE for Joomla! 5
# Performance Mode
# Viktor Vogel <This email address is being protected from spambots. You need JavaScript enabled to view it.>
# https://kubik-rubik.de/pce-page-cache-extended
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{QUERY_STRING} !^$ [OR]
    RewriteCond %{HTTP_USER_AGENT} ^.*X-Bypass-Performance-Mode.*$ [NC]
    RewriteRule ^ - [S=3]

    RewriteCond %{REQUEST_URI} ^/$
    RewriteCond %{DOCUMENT_ROOT}/cache/pce-performance/index -f
    RewriteRule ^(.*)$ /cache/pce-performance/index [L]

    RewriteCond %{REQUEST_URI} ^/(.*)/$
    RewriteCond %{DOCUMENT_ROOT}/cache/pce-performance/%1-index -f
    RewriteRule ^(.*)$ /cache/pce-performance/%1-index [L]

    RewriteCond %{REQUEST_URI} ^(/[^.]*|/.*\.(html|feed))$ [NC]
    RewriteCond %{DOCUMENT_ROOT}/cache/pce-performance/%1-index -f
    RewriteRule ^(.*)$ /cache/pce-performance/%1-index [L]

    <IfModule mod_headers.c>
        Header set Content-Type "text/html" "expr=%{REQUEST_URI} =~ m#^(/[^.]*|/.*\.(html|feed)|/)$#"
    </IfModule>

    # DEBUG MODE - Uncomment to enable header variables in response
    <IfModule mod_headers.c>
        # RewriteRule .* - [E=req_uri:%{REQUEST_URI}]
        # Header set X-Debug-Request-URI "%{req_uri}e"
        # RewriteRule .* - [E=user_agent:%{HTTP_USER_AGENT}]
        # Header set X-Debug-User-Agent "%{user_agent}e"
        # RewriteRule .* - [E=query_string:%{QUERY_STRING}]
        # Header set X-Debug-Query-String "%{query_string}e"
    </IfModule>
</IfModule>

The .htaccess rules also include two exceptions to bypass the performance mode:

  • Requests with the User-Agent header "X-Bypass-Performance-Mode" will bypass the cache and process the request dynamically. To skip the rewrite rules, set this custom user-agent header manually for testing or debugging purposes.
  • URLs with GET parameters (e.g., dynamic links) are excluded from the performance mode, ensuring that dynamic pages or personalised content is constantly processed by the Joomla! application.

Benefits of Performance Mode

  • Lightning-Fast Performance Serves cached HTML pages directly from the server without PHP execution.
  • Reduced Server Load Offload significant processing to static file serving.
  • SEO-Friendly Works seamlessly with Joomla!'s SEF URLs to maintain optimal search engine indexing.

Notes

  • This is a complex feature for more advanced and experienced users. Only use this feature if you know what you are doing!
  • Ensure your .htaccess rules are correctly configured and tested for compatibility with your server environment.
  • Dynamic pages or pages with unique user-specific content may not benefit from this feature unless specific exclusions are applied.

Performance Mode is ideal for static or semi-static pages that do not require dynamic content generation. It is particularly useful for websites with a high volume of traffic or pages that are frequently accessed. By caching the entire HTML output of pages, Performance Mode can dramatically enhance loading speed and minimise server load.

Changelog

+ = Added - ! = Removed - ^ = Changed - # = Fixed

Latest release

Version 5.2.1.0-PRO - 2025-05-03

  • + Added Clean article cache after saving option. With this option, the plugin cleans the cache of a single article during the saving process. Thanks to gdadmin for requesting it!
  • ^ Changed the primary event trigger from "onAfterInitialise" to "onAfterRoute" since the correct language tag is only available earliest in this event required for the cache option.

Download

Overview of all downloads of the extension: PCE - Page Cache Extended Downloads