Choose where TruCMS stores temporary cache data, prepare the selected service correctly, and control full-page response caching.

The Cache page selects the cache driver and controls response caching.
TruCMS uses a cache to avoid rebuilding the same information on every request. The Cache Driver decides where that temporary data is stored. This setting is separate from Response Cache, which can store complete public responses for faster repeat visits.
For a normal single-server installation, File is the least complicated choice. Redis or Memcached make more sense when your hosting already provides those services or when multiple application servers need to share cached data.
Do not select a network cache before it exists
If you choose Redis or Memcached before the service and PHP support are available, pages that need cache access can fail. Prepare the service first, then change the driver.
| Driver | Use it when | Setup needed |
|---|---|---|
| File (default) | You have one application server or ordinary shared hosting. | No external service. TruCMS writes cache files into its writable storage area. |
| Alternative PHP Cache (APC) | Your PHP environment has APCu enabled and you want local in-memory cache on one server. | APCu PHP extension must be installed/enabled for the website's PHP runtime. |
| Database | You want a shared cache without operating Redis/Memcached and can accept extra database traffic. | No external cache service; the application database must remain healthy and responsive. |
| Memcached | Your host provides Memcached and the PHP Memcached extension. | Memcached service, host/port, optional authentication, PHP extension. |
| Redis | Your host provides Redis, especially when the same Redis service will also support queues. | Redis service, host/port, optional authentication/database, compatible PHP Redis support. |
File cache is the default and usually needs no service configuration.
If File cache fails to write, first check the application's writable storage permissions as described in Preparing Your Server.
This option uses APCu memory inside the PHP server. It is appropriate only when APCu is actually enabled for the PHP version serving TruCMS.
APC is local to one server
It is not the best choice for a multi-server installation because each server has its own memory cache.
Database cache stores temporary cache records in the same database environment used by TruCMS. It is simple to operate because there is no separate cache server.
This can be useful when you need shared cache across web processes but cannot run Redis or Memcached. On a high-traffic site, however, it adds load to the database that also serves normal application data.
Memcached is an external in-memory cache. Your host must provide the service and PHP's memcached extension.

Selecting Memcached reveals the connection fields needed to reach the Memcached service.
127.0.0.1 and 11211, but use the values supplied for your server.Memcached Persistent ID allows compatible PHP-FPM environments to reuse the same connection between requests. Leave it empty unless your host specifically recommends a value.
Redis is another external in-memory service and is often the most flexible choice for a managed VPS because the same Redis installation can support both caching and background queues.

Selecting Redis reveals the Redis host, port, authentication and database options.
Using Redis for queues too?
The Queue Driver is configured under Queue & Background Jobs. Keep the queue name separate from the cache purpose and ensure a queue worker is running.
Enable Response Cache stores complete cacheable public responses, which can make repeat visits much faster. It is separate from the general Cache Driver above.
| Option | What it changes | Guidance |
|---|---|---|
| Enable Response Cache | Turns complete-response caching on for public routes that TruCMS marks as cacheable. | Use it on production sites after confirming dynamic pages such as checkout/account flows still behave as expected. |
| Add Cache Headers | Adds cache timing/age information to eligible responses. | Useful when diagnosing whether a response is being cached. |
| Cache Lifetime | How long a cached response remains valid, in seconds. | The default is 604800 seconds (7 days). Shorten it when public content changes frequently. |
| Clear Cache | Clears the application cache and response cache. | Use after changing cache/storage behavior or when the site visibly serves stale content. |