Best Cache Choice for XF2 running on a VPS with PHP7.2

CivilWarTalk

Active member
I recently upgraded to XF 2.0.12, and I also upgraded my PHP to 7.2. I currently have no Cache enabled.

I'm using a Knownhost MVPS-4, so that's shared managed SSD VPS hosting with 8 GB RAM. I use DirectAdmin

Now I need to pick a new Cache for my forum, but I'm not sure what to use.

I used to use APC with XF1.5, but I'm open to changing to a better solution.

Any suggestions?
 
1- Enable the OPcache.

2- Install Redis. You can install the latest Redis version downloading the package directly from its official site. It comes as part of the Redis package, so you will need to have Redis installed locally to use it. And install phpredis. You may install the PhpRedis PHP extension via PECL.

3- Install Redis Cache and Redis View Counters together.

4- Install Image Optimizer and optimize the size of pictures/attachments and avatars.

5- Check the setting of performance and use a JavaScript Library CDN.

6- Install XenForo Enhanced Search.

7- If you have a lot of images (logo, icon, etc) on your site, optimizing them one by one here.

8- Is it possible to share .htaccess file? Feel free to share your own .htaccess tips-tricks and let me see what else I can discover.

All of the above steps are very useful and as a result of this, our forum without any problems (about 2,5 million posts).
 
Unfortunately I had way too many credis error issues with Redis.
Asides from memcache I also use caching through CloudFlare.
 
I tried for 1.5 years and @Xon tried hard to resolve the errors. I'm glad to be rid of those endless errors now that I am no longer running Redis.
 
True. Yet, the new host is not a huge fan of Redis and advised against it as he already had to switch several clients from redis to memcached.
 
We are using both and none of them needs a lot of attention, in fact i dont' t remember redis needing any attention at all whereas memcached does have its bad days once upon a while.
 
Redis has some additional benefits:

  • You can resize the amount of memory being used via redis-cli on the fly without restarting.
  • When cache entries are flushed, Redis releases the memory to the OS. Memcache does not.
  • Easy to setup multiple caches (databases). This way if you have more than one application using redis, they can each have their own DB number and when flushing the app would only flush it's DB rather than global flushing.
 
Back
Top Bottom