41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
<?php
|
|
// Copy to /home/bitrix/www/bitrix/.settings_extra.php
|
|
// Cache -> memcached instance on :11211 with igbinary serializer.
|
|
// Sessions are switched in .settings.php 'session' section (host memcached-sessions-svc note below).
|
|
|
|
return array(
|
|
'cache' => array(
|
|
'value' => array(
|
|
'type' => 'memcached',
|
|
'memcached' => array(
|
|
'host' => '127.0.0.1',
|
|
'port' => 11211,
|
|
),
|
|
// igbinary shrinks cache ~50% and is faster; php8.4-igbinary installed.
|
|
'serializer' => \Memcached::SERIALIZER_IGBINARY, // = 2
|
|
// Under load only one process regenerates cache, others get stale copy:
|
|
'use_lock' => true, // requires Bitrix main >= 24.0.0
|
|
'sid' => $_SERVER["DOCUMENT_ROOT"] . "#01",
|
|
),
|
|
'readonly' => false,
|
|
),
|
|
);
|
|
|
|
/* Sessions (put into .settings.php 'session' value section):
|
|
'session' => array(
|
|
'value' => array(
|
|
'mode' => 'separated',
|
|
'lifetime' => 14400,
|
|
'handlers' => array(
|
|
'kernel' => 'encrypted_cookies',
|
|
'general' => array(
|
|
'type' => 'memcache',
|
|
'host' => '127.0.0.1',
|
|
'port' => 11212,
|
|
),
|
|
),
|
|
),
|
|
'readonly' => true,
|
|
),
|
|
*/
|