This article describes how to configure Joomla to use memcached.
Memcached is an open-source memory object caching system that websites can use to help accelerate page load times. Memcached works by caching in RAM frequently accessed data, such as the results of API calls, database calls, and more.
To enable memcached for Joomla, you need to add and modify some settings in the configuration.php file. To do this, follow these steps:
public $caching = '0'; public $cache_handler = 'file';
Modify these two lines as follows:
public $caching = '2'; public $cache_handler = 'memcache';
If you have a Turbo Boost, Turbo Max, or a Reseller hosting account with Turbo, instead modify the two lines as follows:
public $caching = '0'; public $cache_handler = 'memcached';
Add the following two lines just after the lines you modified in step 3:
public $memcache_server_host = 'localhost'; public $memcache_server_port = '11211';
If you have a Turbo Boost, Turbo Max, or a Reseller hosting account with Turbo, instead modify the first line as follows. Replace username with your account username:
public $memcache_server_host = 'unix:///opt/memcached/run/username/memcached-1.sock';
After you enable memcached in the configuration.php file, additional settings are available in the Joomla administration console. To view and modify these settings, follow these steps:
You configured most of these options in the configuration.php file to enable memcached for the first time. The two exceptions are:
You can leave these options unchanged from their default values.