Memory cache for shared hosting

Hello fellows,
I just joined this forum and am happy to become part of the community!
Could someone help me with this question?
“How do you install and enable a local memcache as mentioned the admin manual (https://docs.nextcloud.com/server/9/admin_manual/configuration_server/caching_configuration.html) but in a shared hosting environment?”

1 Like

I fear that this is not possible, and I think activating memory cache is not essential

Oh, alright. Thanks for your help, Soko.

The following line in config.php works with OVH shared hosting:

'memcache.local' => '\\OC\\Memcache\\ArrayCache',

No guarantee that it will work with other hosting, but it’s worth a try. :wink:

5 Likes

In fact, it works like a breeze here. Thanks for the magic :wink:

The benefit of using arraycache is close to 0 thou :wink:

If you do not add to much apps and your host is not tooooo bad (use php7, gives you a great speed) then you not really need caching … Most shared hoster don’t offer but ask yours, maybe you get something, but often it doesn’t brings a big effect specially at shared hosting with one alone :wink:
Perfect is combination of redis & apcu

So why is it offered as an option?

You are probably right – most modern hosting will already have more optimisation than I can apply (especially given the limited admin access). So let’s allow the suppression of those warnings, if they serve no purpose and note in the documentation that they are not important.

If I wanted ‘perfect’, I wouldn’t be installing on shared hosting (the subject of this thread) … ‘working’ is fine. ‘Working without warnings’ would be better.

Because it’s not of none benefit, but compared to real caching it’s like a 1-3% of the potential boost.

Works for installations hosted at all-inkl as well.

And for the usefulness and benefit: at least it gets rid of the according warning on the admin page and, hence, stopped bothering me with it’s sheer existence :sunglasses:

1 Like

100% correct
caching is just a optical performance feature - at the moment you get most out of the box with PHP7 as well a good service to the system environments - but to have best performance, you need a own server where you can set everything as you like.

Shared hosting is always something for low use and a little bit bad deal where you cannot expect to much

@John: Exactly my point. Persistent warnings, habitually ignored, are never a good thing to encourage.

If I could just get rid of the getenv("PATH") warning – which I have no possibility of ever removing with configuration – I would be very pleased.

@nickvergessen: I could probably get 1-3% improvement by rebooting my router … :wink: [quote=“aLpHa, post:11, topic:2126”]
Shared hosting is always something for low use and a little bit bad deal where you cannot expect to much
[/quote]

I think we already know this, but it’s fine for many small businesses and private individuals. After all, people are running oC/NC on Raspberry Pis – convenience is sometimes more important than absolute performance. ‘Good enough’ is, well, good enough.

My point is that warnings are presented that we are teaching people to ignore.

It makes the warning go away :+1:

For the benefit of the discussion and of the general public:

Ref NC 16 Docs » Nextcloud configuration » Memory caching

Nextcloud supports multiple memory caching backends, so you can choose the type of memcache that best fits your needs. The supported caching backends are:

  • APCu, APCu 4.0.6 and up required.
    A local cache for systems.

  • Redis, PHP module 2.2.6 and up required.
    For local and distributed caching as well as transactional file locking.

  • Memcached
    For distributed caching.

Memcaches must be explicitly configured in Nextcloud by installing and enabling your desired cache, and then adding the appropriate entry to config.php
[…]

Note: […] Nextcloud supports only the memcached PHP module.

Hope this helps.

I activated memcache in the PHP configuration on my Hostinger panel and it worked!