This page is about an old version of Active Collab that's not developed anymore.
Click here to open the documentation for the latest version.

How to configure the data cache?

activeCollab uses file system data caching. While this makes the system a bit faster than when there is no caching at all, we strongly recommend that you use memory caching instead.

In this article, we will help you learn how to use different memory caching methods to get the best results and to increase the performance of your activeCollab.

Configuring memcached Data Cache #

To configure activeCollab to use memcached, please add the following lines to your config/config.php before require_once line (otherwise configuration will not be applied):

1
2
const CACHE_BACKEND = 'memcached';
const CACHE_MEMCACHED_SERVERS = '127.0.0.1:11211';

Please note that CACHE_MEMCACHED_SERVERS can be a comma separated list of memcached servers, and that the port bit in address is optional (if omitted, activeCollab will use the default port).

The configuration of the memcached server itself is out of the scope of this article, but the default configuration should work fine for most environments.

Configuring APC Data Cache #

If you are using APC as both, data and opcode cache, our recommendation would be to give it at least 128M. Any amount less than 128M could (and probably will) cause fragmentation of APC memory, which can lead to degraded application performance.

To change the size of the APC shared memory, please add/change the following configuration option in php.ini (or the relevant configuration file for APC, eg. /etc/php/conf.d/apc.ini on most Debian systems):

1
- apc.shm_size = 128M

This is just a minimum recommendation. Large setups with a lot of users, projects, and data will benefit from a larger cache.

Configuring APC as Opcode Only #

In the case of a combination of APC and memcached, activeCollab will use APC as an opcode cache only (you need to have a proper memcached setup, as described above). In such cases, you should decrease the APC shared memory amount to 64M, as the data cache will go to memcached. Again, change apc.shm_size:

1
- apc.shm_size = 64M

Configuring OPCache #

activeCollab works out of the box with OPCache. OPCache is an opcode cache only and, as opposed to APC, it cannot be used as a data cache. This is why we highly recommend you to use OPCache in combination with memcached to get the best results.

The default OPCache runtime configuration is quite all right. We recommend at least 64M of memory for OPCache - this is configured out of the box, so there is no need for an additional setup. Again, if you have a large setup, you probably want to give more memory to OPCache by changing following configuration option:

1
- opcache.memory_consumption = 128

In this example we have changed the memory size to 128M. You will notice that there is no M suffix here, because there is no need to use it - that is the correct way of setting it up.