Skip to content

Joomla Caching — System Cache, Page Cache and Performance Optimization

DodaTech Updated 2026-06-27 15 min read

In this tutorial, you'll learn how Joomla caching works — from system cache and page cache plugins to browser caching and Redis — so you can dramatically speed up your site for visitors and reduce server load.

What You'll Learn

  • The difference between Conservative Cache and Progressive Cache in Joomla
  • How to enable and configure the Page Cache plugin for anonymous visitors
  • Browser caching via .htaccess with Expires and Cache-Control headers
  • Installing Redis and Memcached as cache handlers for Joomla
  • Clearing and managing cache from the administrator dashboard
  • Module-level and view-level caching options
  • When NOT to cache content (logged-in areas, carts, forms)
  • CDN integration with Cloudflare for static asset caching

Why It Matters

Joomla is built on PHP and MySQL, which means every page request triggers PHP execution and database queries. Without caching, each Visitor forces Joomla to load the framework, run plugins, query the database, and render the template — over and over. Caching stores the rendered output so Joomla skips most of that work. A properly cached Joomla site can load in under a second. An uncached site with moderate traffic can take 3–5 seconds and consume ten times the server resources. Caching is the single highest-impact performance optimization you can make.

Real-World Use

A community news site running Joomla gets 50,000 visitors per day. Without caching, each page load executes 80+ database queries, taking 4 seconds. The server struggles under peak traffic. After enabling system cache (progressive), the Page Cache plugin for guests, browser caching via .htaccess, and Redis as the cache handler, page load time drops to 0.4 seconds for anonymous visitors and 0.8 seconds for logged-in users. The server handles the same traffic at 15% CPU usage instead of 85%. The publisher saves money on hosting and visitors get a faster experience.

Learning Path

flowchart LR
  A["Joomla Admin Dashboard"] --> B["Joomla Caching"]
  B --> C["Joomla SEO"]
  C --> D["Smart Search"]
  D --> E["Media Manager"]

  B --> F["Joomla Performance"]

  classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px
  class B current

Joomla Caching Layers

Joomla offers several caching layers, each serving a different purpose. Think of them as different types of storage:

  • System Cache — stores rendered components and modules. Fastest for dynamic content.
  • Page Cache — stores the entire HTML output of a page. Only works for guests (not logged in).
  • Browser Cache — tells the visitor's browser to store static files locally.
  • View Cache — caches individual article or category views.
  • Module Cache — caches the output of specific modules.

You can and should use multiple layers together. They do not conflict. Each handles a different part of the request.

System Cache

The system cache is the most commonly used cache in Joomla. You enable it in Global Configuration.

Enabling System Cache

Go to System > Global Configuration > System and find the Cache Settings section:

Setting Recommended Value
Cache ON - Conservative or ON - Progressive
Cache Time 15
Cache Handler File

Conservative Cache stores the output of components and modules after the page is rendered. The cached version is used for all subsequent requests until it expires.

Progressive Cache goes further. It caches individual parts of the page separately. When one module changes, only that module's cache needs to be refreshed, not the entire page. Progressive cache is more efficient for sites where some modules change frequently.

Here is an example of how conservative cache works:

// Pseudo-code showing conservative cache flow
if (cache_has("article_42")) {
    // Serve cached output
    echo cache_get("article_42");
} else {
    // Render the article normally
    $html = renderArticle(42);
    cache_set("article_42", $html, 900); // 15 minutes
    echo $html;
}

Progressive cache splits the page into cache keys per module:

// Each module has its own cache key
foreach ($modules as $module) {
    $key = "module_" . $module->id;
    if (cache_has($key)) {
        echo cache_get($key);
    } else {
        $html = renderModule($module);
        cache_set($key, $html, 900);
        echo $html;
    }
}

When to Use Conservative vs Progressive

Use Conservative when your site content changes infrequently and you want simplicity. Use Progressive when you have dynamic modules (like a "Latest News" module) that change often but you still want to cache the rest of the page.

Cache Handlers

The Cache Handler setting determines where cached data is stored:

  • File — stores cache files on disk. Works everywhere. No extra setup needed.
  • Redis — in-memory cache. Requires PHP Redis extension. Much faster than File.
  • Memcached — distributed memory cache. Good for multi-server setups.
  • XCache — PHP opcode cache. Less common in modern setups.
  • APCu — user cache. Stores data in shared memory.

Page Cache Plugin

The System - Page Cache plugin caches the entire HTML output of a page. It is the most aggressive cache Joomla offers.

How It Works

When a visitor requests a page, Joomla renders it completely. The Page Cache plugin stores the final HTML output. The next time someone requests the same URL, Joomla serves the cached HTML directly — it skips component rendering, module rendering, and even most of the framework initialization.

Enabling Page Cache

  1. Go to Extensions > Plugins
  2. Search for "Page Cache"
  3. Click System - Page Cache
  4. Set Status to Enabled
  5. Configure settings:
Setting Description
Cache Time How long to cache pages (default 15 minutes)
Cache Browsers Whether to serve cached pages to browser
Exclude Cookie Cookies that should bypass cache (add dynamic cookie names)

Important: Only for Guests

The Page Cache plugin only works for visitors who are not logged in. Once a user logs in, Joomla sets a session cookie, and the Page Cache plugin skips caching for that user. This is intentional — cached pages cannot know what personalized content to show.

Excluding Pages from Page Cache

Some pages should never be cached — shopping carts, checkout pages, forms with CSRF tokens. You can exclude them in the plugin settings:

; In the plugin "Exclude Menu Items" setting
; List menu item IDs separated by commas
exclude_menu_items = 42, 57, 88

You can also exclude by URL pattern using the Exclude URL field.

Browser Caching

Browser caching tells the visitor's browser to store static files (CSS, JavaScript, images) locally. When the visitor visits another page, the browser loads these files from its local cache instead of downloading them again.

Configuring Browser Caching via .htaccess

Joomla ships with a sample .htaccess file with browser caching rules already included but commented out. Here is how to enable them:

# Enable browser caching
<IfModule mod_expires.c>
  ExpiresActive On

  # Default: 1 month
  ExpiresDefault "access plus 1 month"

  # CSS and JavaScript: 1 year
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"

  # Images: 1 year
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"

  # Fonts: 1 year
  ExpiresByType font/ttf "access plus 1 year"
  ExpiresByType font/woff "access plus 1 year"
  ExpiresByType font/woff2 "access plus 1 year"
</IfModule>

You also need Cache-Control headers:

<IfModule mod_headers.c>
  # CSS and JavaScript
  <FilesMatch "\.(css|js)$">
    Header set Cache-Control "max-age=31536000, public, immutable"
  </FilesMatch>

  # Images
  <FilesMatch "\.(jpg|jpeg|png|gif|webp|svg)$">
    Header set Cache-Control "max-age=31536000, public, immutable"
  </FilesMatch>

  # Fonts
  <FilesMatch "\.(ttf|woff|woff2)$">
    Header set Cache-Control "max-age=31536000, public, immutable"
  </FilesMatch>
</IfModule>

Adding Browser Caching Headers

If you do not want to edit .htaccess directly, some Joomla extensions can add caching headers for you. But the .htaccess method is the fastest because Apache handles it before PHP even starts.

Redis Cache Handler

Redis is an in-memory data store that works much faster than file-based caching. Setting it up requires server access.

Installing PHP Redis Extension

# Ubuntu/Debian
sudo apt install php8.1-redis
sudo systemctl restart apache2

# CentOS/RHEL
sudo yum install php-redis
sudo systemctl restart httpd

# Verify Redis extension is loaded
php -m | grep redis

Install and Start Redis Server

sudo apt install redis-server
sudo systemctl enable redis-server
sudo systemctl start redis-server

Configure Joomla to Use Redis

  1. Go to System > Global Configuration > System
  2. Set Cache Handler to Redis
  3. Configure Redis connection:
Setting Value
Redis Server localhost
Redis Port 6379
Redis Auth (leave blank if no password)
Redis Database 0

Verify Redis Working

redis-cli
> monitor

Then visit a page on your Joomla site. You should see cache keys being set and retrieved.

Memcached Cache Handler

Memcached is another in-memory cache system, designed for distributed environments.

Installing Memcached

sudo apt install memcached php-memcached
sudo systemctl enable memcached
sudo systemctl start memcached

Configure Joomla

Set Cache Handler to Memcached and configure:

Memcached Server: localhost
Memcached Port: 11211

Module Caching

Each module has its own caching settings in its configuration:

Setting Behavior
Do not cache Module output is never cached
Use global Respects the global system cache setting
Conservative Cache module output until cache time expires
Progressive Cache module output, refresh individual items if they change

You can reach these settings by editing any module, then looking in the Advanced tab under Caching.

View Caching

You can cache individual article and category views. For example, to cache articles:

  1. Go to Content > Articles > Options
  2. In the Article tab, set Cache to ON
  3. Set Cache Time to a value in minutes

Similarly, Content > Categories > Options has the same settings for category views.

Clearing Cache

When you make changes to your site — publish an article, change a module, update a plugin — you need to clear the cache to see the changes.

From the Admin Toolbar

In the top toolbar of the administrator interface, click System > Clear Cache. You can also see the Clear Cache icon in the admin toolbar.

From System > Clear Cache

  1. Go to System > Clear Cache
  2. You will see cache groups: _admin, _system, _page, com_modules, com_plugins, com_content
  3. Check the groups you want to clear
  4. Click Delete

Expired Cache

In the same screen, click Delete Expired to clear only cache entries past their expiration time. This is faster than clearing everything.

CDN Integration

A Content Delivery Network (CDN) stores copies of your static files on servers worldwide. When a visitor in Tokyo requests your site, the CDN serves files from a server in Tokyo instead of your origin server in New York.

Cloudflare Setup

  1. Sign up for Cloudflare
  2. Add your domain
  3. Update your nameservers to Cloudflare's
  4. In Cloudflare Dashboard > Speed > Optimization:
    • Enable Auto Minify (HTML, CSS, JS)
    • Enable Brotli compression
    • Enable Rocket Loader (test thoroughly)

Page Cache with CDN

The Page Cache plugin combined with Cloudflare gives excellent performance. Cloudflare caches static assets automatically. For full page caching, enable Cloudflare's Cache Everything page rule:

Page Rule: *yoursite.com/*
Cache Level: Cache Everything
Edge Cache TTL: 7 days

Combine this with Joomla's Page Cache plugin. Cloudflare caches at the network edge. Joomla's page cache serves cached content even if Cloudflare makes a new request.

Cache Debugging

Joomla includes a debug mode that shows cache hits and misses.

  1. Go to System > Global Configuration > System
  2. Set Debug System to Yes
  3. Set Debug Language to Yes (optional)
  4. Visit a frontend page
  5. Scroll to the bottom — the debug console shows query count, cache usage, and load time

Look for lines like:

Cache hits: 12
Cache misses: 2

High cache hit ratio means caching is working well. Many cache misses means your cache time might be too short or cache is being cleared too often.

When NOT to Cache

Some parts of a Joomla site must never be cached:

  • Logged-in areas — personalized content changes per user
  • Shopping carts — cart contents depend on the user's session
  • Checkout pages — must always be fresh to prevent double charges
  • Form submissions — CSRF tokens are unique per request
  • Members-only areas — access control must be checked on every request
  • Dynamic content — real-time data like stock prices or weather

The Page Cache plugin automatically skips logged-in users. For module-level caching, set the module to Do not cache if it shows user-specific content.

Common Mistakes

  1. Enabling Page Cache while logged in and thinking it works: The Page Cache plugin does not cache pages for logged-in users. You must test caching performance in an incognito/private browser window.

  2. Using Conservative Cache when Progressive is needed: If you have dynamic modules (like "Most Popular Posts"), Conservative Cache caches the entire page including the module. Visitors see stale data in that module. Progressive Cache caches modules separately.

  3. Forgetting to clear cache after content updates: New articles or changed modules may not appear until cache is cleared. Always clear cache after publishing new content.

  4. Not configuring .htaccess browser caching: Without browser caching, every page load downloads CSS, JavaScript, and images from scratch. This quadruples page load time on repeat visits.

  5. Using file cache with high traffic on shared hosting: File-based caching writes many small files to disk. On shared hosting with slow I/O, this becomes a bottleneck. Use Redis or Memcached instead.

Practice Questions

  1. What is the difference between Conservative Cache and Progressive Cache in Joomla? Answer: Conservative Cache stores the entire page output as a single cache entry. Progressive Cache stores individual components and modules separately, so only the changed parts need to be refreshed. Progressive is better for sites with dynamic modules.

  2. Why does the Page Cache plugin only work for guest visitors? Answer: Page Cache stores the complete HTML output and serves it to the next visitor without running Joomla's code. Logged-in users see personalized content (their name, member-only links, etc.) that cannot be predicted and cached. Therefore, Joomla skips page caching for any user with a session cookie.

  3. What command installs Redis on Ubuntu, and what PHP extension does Joomla need to use Redis as a cache handler? Answer: sudo apt install redis-server php8.1-redis then restart Apache with sudo systemctl restart apache2. Joomla needs the PHP Redis extension (php-redis) and the Redis server running.

  4. Challenge: Set up a complete caching stack for a Joomla site on a test server. Enable system cache (Conservative, 15 minutes), Page Cache plugin (10 minutes), browser caching via .htaccess (1 year for assets), and Redis as the cache handler. Test page load time before and after using incognito mode. Write down the load times and the number of cache hits shown in Joomla's debug console.

FAQ

What is the difference between Joomla system cache and page cache?

System cache stores rendered components and modules output, while Page Cache stores the complete HTML output of a page. Page Cache is more aggressive but only works for guest visitors. System cache works for all visitors including logged-in users.

How do I clear Joomla cache after making changes?

Go to System > Clear Cache in the administrator dashboard, check the cache groups you want to clear, click Delete. You can also click Delete Expired to remove only expired entries. The Clear Cache button in the admin toolbar clears all cached data.

Does Joomla work with Cloudflare?

Yes, Joomla works well with Cloudflare. Enable Cloudflare's caching features for static assets and use Cloudflare's Page Rules to cache HTML pages. Combine with Joomla's Page Cache plugin for best results.

What cache handler should I use for Joomla?

File cache works for small sites on shared hosting. Redis is recommended for most sites — it is much faster than file cache and uses memory instead of disk I/O. Memcached is good for multi-server setups. Choose Redis if you have root access to your server.

Why is my Joomla site slow even with caching enabled?

Check that caching is actually working by visiting in incognito mode and checking the debug console for cache hits. Also check that browser caching headers are being sent correctly. Other causes include: slow hosting, unoptimized images, too many extensions, or insufficient PHP memory.

Mini Project

Your task is to implement a full caching Strategy for a sample Joomla site.

Set up a local Joomla installation with sample data. Configure the following caching layers:

  1. Enable system cache in Global Configuration with Progressive mode and 20-minute cache time
  2. Enable the Page Cache plugin with 15-minute cache time
  3. Add browser caching rules to your .htaccess file with 1-year expiration for CSS, JS, and images
  4. Install and configure Redis as the cache handler (use a Docker Redis container if you do not have Redis locally)
  5. Visit a page in an incognito browser and check the response headers for Cache-Control and Expires
  6. Check Joomla's debug console to see cache hits and load time
  7. Publish a new article and observe how long it takes for the new article to appear

Write down each step and the results. This exercise teaches you how all caching layers work together in a real Joomla environment.

What's Next

Now that you understand Joomla caching, you are ready to optimize your site for search engines:

Continue to Lesson 30: Joomla SEO — Configure SEF URLs, metadata, sitemaps, and redirects.

Related lessons:

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro