Views: 2759 (Data available since 06.02.2017)
Set parameters in the file /etc/sysconfig/memcached:
USER="bitrix"
- user from which memcached will be launched;
OPTIONS="-t 8 -s /tmp/memcached.sock"
- quantity of flows and path to socket.
- Restart memcached via command:
CentOS 6:
service memcached restart
CentOS 7:
systemctl restart memcached.service
- After that, it is necessary to modify settings in
/bitrix/php_interface/dbconn.php
:
define("BX_CACHE_TYPE", "memcache");
define("BX_CACHE_SID", $_SERVER["DOCUMENT_ROOT"]."#01");
define("BX_MEMCACHE_HOST", "unix:///tmp/memcached.sock");
define("BX_MEMCACHE_PORT", "0");
and in the file /bitrix/.settings_extra.php
(create it, if unavailable):
<?php
return array(
'cache' => array(
'value' => array(
'type' => 'memcache',
'memcache' => array(
'host' => 'unix:///tmp/memcached.sock',
'port' => '0',
),
'sid' => $_SERVER["DOCUMENT_ROOT"]."#01"
),
),
);
?>