Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarified on the usage of Redis and PHP 7.0+ is required now #1140

Merged
merged 1 commit into from
Jan 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions admin_manual/configuration_server/caching_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ You may use both a local and a distributed cache. Recommended caches are APCu
and Redis. After installing and enabling your chosen memcache, verify that it is
active by running :ref:`label-phpinfo`.

.. note:: If you run multiple web servers and enable a distributed cache in
your ``config.php`` (``memcache.distributed``) or a file locking provider
(``memcache.locking``) you need to make sure that they are referring to the
very same memcache server and not to ``localhost`` or a unix socket.

APCu
----

Expand All @@ -59,8 +64,8 @@ Refresh your Nextcloud admin page, and the cache warning should disappear.
Redis
-----

Redis is an excellent modern memcache to use for both local and distributed caching, and
as a local cache for :doc:`Transactional File Locking
Redis is an excellent modern memcache to use for distributed caching, and
as a key-value store for :doc:`Transactional File Locking
<../configuration_files/files_locking_transactional>` because it guarantees
that cached objects are available for as long as they are needed.

Expand Down Expand Up @@ -99,7 +104,7 @@ If you want to connect to Redis configured to listen on an Unix socket (which is
recommended if Redis is running on the same system as Nextcloud) use this example
``config.php`` configuration::

'memcache.local' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\APCu',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you can have both local memcache and distributed?
How the data distribution is done?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's by requirement: so if the data is fine to be stored locally only then this is used if it needs to be instance wide cached in the same way then the distributed one is used.

By default the distributed one is requested. Local one is typically used for PHP objects and stuff that is highly specific to that system and not the instance at a whole.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for the clarification !

'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => [
'host' => '/var/run/redis/redis.sock',
Expand Down Expand Up @@ -204,8 +209,6 @@ These instructions are adaptable for any distro that does not package the
supported version, or that does not package Redis at all, such as SUSE Linux
Enterprise Server and Red Hat Enterprise Linux.

The Redis PHP module must be at least version 2.2.6.

For PHP 7.0 and PHP 7.1 use Redis PHP module 3.1.x or later.

See `<https://pecl.php.net/package/redis>`_
Expand Down