@@ -203,6 +203,7 @@ The following options are available to configure when using a single redis serve
203203 'memcache.locking' => '\OC\Memcache\Redis',
204204 'memcache.distributed' => '\OC\Memcache\Redis',
205205 'memcache.local' =>'\OC\Memcache\Redis' ,
206+ 'memcache_customprefix' => 'mynextcloudprefix',
206207 'redis' => [
207208 // 'host' => see connection parameters below
208209 // 'port' => see connection parameters below
@@ -219,6 +220,7 @@ are optional)::
219220 'memcache.locking' => '\OC\Memcache\Redis',
220221 'memcache.distributed' => '\OC\Memcache\Redis',
221222 'memcache.local' =>'\OC\Memcache\Redis' ,
223+ 'memcache_customprefix' => 'mynextcloudprefix',
222224 'redis.cluster' => [
223225 'seeds' => [ // provide some/all of the cluster servers to bootstrap discovery, port required
224226 'cache-cluster:7000',
@@ -395,3 +397,17 @@ Cache Directory location
395397The cache directory defaults to ``data/$user/cache `` where ``$user `` is the
396398current user. You may use the ``'cache_path' `` directive in ``config.php ``
397399(See :doc: `config_sample_php_parameters `) to select a different location.
400+
401+ Cache Key Prefix for Redis or Memcached
402+ ---------------------------------------
403+
404+ By default, Nextcloud generates a semi-unique prefix for cache keys using information like instance ID, version etc. to mitigate the problem of
405+ collisions when using the same cache for multiple Nextcloud instances.
406+ If you want to make sure to prevent collisions altogether, you can use the following
407+ setting to define your custom prefix::
408+
409+ 'memcache_customprefix' => 'mynextcloudprefix',
410+
411+ This also allows you to create ACLs in Redis and limit the keys specific users can access
412+ (e.g. if you want to isolate specific Nextcloud instances when using the same cache).
413+ This may be security-relevant for you.
0 commit comments