The object cache (Redis) is mainly used to cache responses from the database that the page uses. For pages that use the database a lot and where the responds are the same, the object cache can help to speed up the page.
How do I enable the object cache?
Object cache are disabled by default and are currently activated manually by our support if you as a customer contact us via email@example.com. In the future, this can be controlled directly from Loopia Customer zone. When the object cache is enabled, you have to program your page yourself to save data in the cache. For many CMS (WordPress, Joomla, etc.) there are plugins that do this automatically.
How do I manually connect to the object cache?
You connect to Redis with a UNIX socket which address you find in the server variable $_SERVER[’LOOPIA_REDIS_SOCK’].
How do I use the object cache with WordPress?
To pair the object cache with WordPress, we recommend the “Redis Object Cache” plugin (https://wordpress.org/plugins/redis-cache/). When this plugin is activated, you need to add the following rows to the wp-config.php file:
define('WP_REDIS_CLIENT', 'pecl'); define('WP_REDIS_SCHEME', 'unix'); define('WP_REDIS_PATH', $_SERVER['LOOPIA_REDIS_SOCK']);