Enable memcached


#1

I see in this file:
http://phpkode.com/source/p/piwik/piwik/libs/Zend/Cache/Backend/Memcached.php

that there are a feature to use memcached. How do i enable this feature?

Where do i add my servers? i have 3 memcached servers.


(vipsoft) #2

At the moment, only memcached sessions are supported.

In your Piwik folder, create a “bootstrap.php” file containing:


<?php
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', 'tcp://server:port?persistent=1&weight=1&timeout=1&retry_interval=15');

Or modify the master php.ini file (e.g., /etc/php5/apache2/php.ini) to set:


[session]
session.save_handler = memcache
session.save_path="tcp://server:port?persistent=1&weight=1&timeout=1&retry_interval=15"

Then restart Apache.


#3

<?php
ini_set('session.save_handler', 'memcached');
ini_set('session.save_path', 'localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15');

is not correct ?

http://php.net/manual/en/memcached.sessions.php