summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-01-14 18:25:00 +0000
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-03-05 11:36:34 +0000
commit0e4933e6d248ab383e6221e045fec2eaf3d17082 (patch)
tree5a9f368158b61b276276edaba92d6acb2e922e58 /config
parentf507601e259da2e6b67237ffcfe8eeda880062ef (diff)
downloadnextcloud-server-0e4933e6d248ab383e6221e045fec2eaf3d17082.tar.gz
nextcloud-server-0e4933e6d248ab383e6221e045fec2eaf3d17082.zip
Refactor \OC\Memcache\Factory
Caches divided up into two groups: distributed and local. 'Low latency' is an alias for local caches, while the standard `create()` call tries to get distributed caches first, then local caches. Memcache backend is set in `config.php`, with the keys `memcache.local` and `memcache.distributed`. If not set, `memcache.distributed` defaults to the value of `memcache.local`.
Diffstat (limited to 'config')
-rw-r--r--config/config.sample.php30
1 files changed, 26 insertions, 4 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 4b902b306be..94284e28dd8 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -783,9 +783,32 @@ $CONFIG = array(
/**
+ * Memory caching backend configuration
+ *
+ * Available cache backends:
+ * - \OC\Memcache\APC Alternative PHP Cache backend
+ * - \OC\Memcache\APCu APC user backend
+ * - \OC\Memcache\ArrayCache In-memory array-based backend (not recommended)
+ * - \OC\Memcache\Memcached Memcached backend
+ * - \OC\Memcache\Redis Redis backend
+ * - \OC\Memcache\XCache XCache backend
+ */
+
+/**
+ * Memory caching backend for locally stored data
+ * Used for host-specific data, e.g. file paths
+ */
+'memcache.local' => '\OC\Memcache\APCu',
+
+/**
+ * Memory caching backend for distributed data
+ * Used for installation-specific data, e.g. database caching
+ * If unset, defaults to the value of memcache.local
+ */
+'memcache.distributed' => '\OC\Memcache\Memcached',
+
+/**
* Connection details for redis to use for memory caching.
- * Redis is only used if other memory cache options (xcache, apc, apcu) are
- * not available.
*/
'redis' => array(
'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock'
@@ -795,8 +818,6 @@ $CONFIG = array(
/**
* Server details for one or more memcached servers to use for memory caching.
- * Memcache is only used if other memory cache options (xcache, apc, apcu,
- * redis) are not available.
*/
'memcached_servers' => array(
// hostname, port and optional weight. Also see:
@@ -806,6 +827,7 @@ $CONFIG = array(
//array('other.host.local', 11211),
),
+
/**
* Location of the cache folder, defaults to ``data/$user/cache`` where
* ``$user`` is the current user. When specified, the format will change to