Merge pull request #7523 from dhensby/pull/3514

caching.md, false examples: updated
This commit is contained in:
Damian Mooyman 2017-10-27 10:54:07 +13:00 committed by GitHub
commit fde8eab537

View File

@ -114,7 +114,7 @@ To use this backend, you need a memcached daemon and the memcache PECL extension
:::php
// _config.php
SS_Cache::add_backend(
'primary_memcached',
'primary_memcached',
'Memcached',
array(
'servers' => array(
@ -130,6 +130,28 @@ To use this backend, you need a memcached daemon and the memcache PECL extension
)
);
SS_Cache::pick_backend('primary_memcached', 'any', 10);
If your Memcached instance is using a local Unix socket instead of a network port:
:::php
// _config.php
SS_Cache::add_backend(
'primary_memcached',
'Memcached',
array(
'servers' => array(
'host' => 'unix:///path/to/memcached.socket',
'port' => 0,
'persistent' => true,
'weight' => 1,
'timeout' => 5,
'retry_interval' => 15,
'status' => true,
'failure_callback' => null
)
)
);
SS_Cache::pick_backend('primary_memcached', 'any', 10);
### APC