Cache configuration

Jadu caches the results of many database queries to improve performance. By default, cache files are stored on the server file system.

When deploying a site over multiple servers it is desirable to synchronise the deleting of particular parts of the cache. For example, if a Continuum CMS user updates a piece of content then the cache should be cleared on all servers so that users of the web site all see the new content.

There are 3 supported locations for cache storage:

  • filesystem
  • memcached
  • Redis

Filesystem

Filesystem is the default storage location of the cache. Jadu can be configured to use the filesystem by editing <install_path>/config/system.xml and changing the value of CACHE_DATA_STORE to file.

<cache_data_store>file</cache_data_store> 

Redis

Redis is an in-memory data structure store that can be used as a cache. It is necessary for the redis PHP extension to be installed to take advantage of this functionality.

Redis is our recommended cache solution for clustered Windows systems.

Jadu can be configured to use memcached by editing <install_path>/config/datastore.xml.

First add details of the memcached servers as follows.

<?xml version="1.0" encoding="utf-8" ?>
<datastore xmlns:config="http://www.jadu.co.uk/schema/config">
    <redis>
        <servers>
            <server host="localhost" port="6379"/>
        </servers>
    </redis>
</datastore>

It is also necessary to change the value of the CACHE_DATA_STORE (within the system.xml config) constant to redis, rather than file.

<cache_data_store>redis</cache_data_store> 

Memcached

Memcached is a distributed object caching system. It can be used to store a single copy of the Jadu cache over multiple servers rather than on each individual file system. It is necessary for the memcached PHP extension to be installed to take advantage of this functionality.

Jadu can be configured to use memcached by editing <install_path>/config/datastore.xml.

First add details of the memcached servers as follows.

<?xml version="1.0" encoding="utf-8" ?>
<datastore xmlns:config="http://www.jadu.co.uk/schema/config">
    <memcached>
        <servers>
            <server host="memcached-1" port="11211"/>
        </servers>
    </memcached>
</datastore>

It is also necessary to change the value of the CACHE_DATA_STORE constant to memcached, rather than file.

<cache_data_store>memcached</cache_data_store>

results matching ""

    No results matching ""