1,
sudo apt install php-apcu
2, Modify your:
/etc/php/X.Y/mods-available/apcu.ini like this
extension=apcu.so
apc.shm_size = “50M”
(Only those two lines. 50 MB is can be other.)
3,Edit your /your_path/nextcloud/config/config.php file by adding a new line:
‘memcache.local’ => ‘\OC\Memcache\APCu’,
(The “’\\OC\\Memcache\\APCu,” is very bad it can causes Internal Server error.
Unfortunetly the Internet is full of that double backslash comments.