0

I am using a wordpress installation on

Ubuntu 16 
Nginx
Php-fpm (latest version)

I intend to use W3 total cache for caching purposes and was wondering whether I should be going for Memcached or APC ?

Any experiences to share?

JoaMika
  • 499
  • 2
  • 9
  • 21
  • APC is dead. There's no real choice here. – Michael Hampton Sep 04 '16 at 22:51
  • didn't realise! so i guess memcached is the way to go.. no other competitors for my config ? – JoaMika Sep 04 '16 at 22:54
  • Use the Nginx page cache if your website has mostly anonymous data. Some information on a tutorial I wrote here https://www.photographerstechsupport.com/tutorials/hosting-wordpress-on-aws-tutorial-part-4-wordpress-website-optimization/ – Tim Sep 04 '16 at 23:59
  • @MichaelHampton APCu is alive and much faster than memcached for single-threaded non-clustered PHP apps... – Anubioz Sep 05 '16 at 00:21
  • Caching and accelerating PHP is fine, but if you can avoid even invoking PHP to generate pages you'll get 1-2 orders of magnitude speedup. As I said above, Nginx page caching is an effective solution that I use myself, but it's not suitable for sites where most users log in. – Tim Sep 05 '16 at 02:45
  • Tim, I am running a membership site and users will have to be logged in, so I have to accommodate both scenarios - SSL as well. – JoaMika Sep 05 '16 at 08:42

2 Answers2

1

Exactly our setup. Well, APC is dead as others have commented. On ubuntu, officially killed since Ubuntu 14.

You're left with mainly two mainstream options:

  • Memcached: fantastic and fast as a simple key/value store. Works on windows too.

  • Redis: same as above but considerably slower if you just need a simple key/value store. Redis has far more options though, with rich data, pub/sub, etc. Said to work on windows, but we haven't tested.

From our experience, Memcached is great, easy to implement and because it works on windows, it allows our developers to keep a complete windows development stack locally on their workstations/laptop without servers or virtual machines.

John
  • 256
  • 2
  • 4
  • thanks John, I am using Mac so I guess that's not a problem either – JoaMika Sep 05 '16 at 08:44
  • haven't tested memcached on mac but I see no reasons why it wouldn't work well. One word of advice: page caching of wordpress is a work of art :).. Static websites are perfect candidates for page caching. Dynamic sites require more planning. – John Sep 05 '16 at 18:07
0

as long as I learned the best is to use both APCu and Opcode, the first one as a serializer, then use memcached. I saw a bunch of benchmarks and atm Redis looks better than memcached, but it's better to use it on a standalone server.

user103969
  • 31
  • 2