Caching combo

Wondering what would be the best caching options? Which ones should I use or disable…or add something different.

Currently have several WordPress sites on nginx. Haven't installed WP Super Cache yet, but it sounds like this could prevent most pages from even having to run Php once cached. One VPS has several Wordpress sites, two with decent traffic. Figured some combo of caching would lower load/cpu.

Nginx caching,

Php Apc,

MySQL Query Cache,

Wp Super Cache.

Any other info I can provide?

5 Replies

It's been a while since I even remotely dealt with wordpress (thank goodness), but in my experience WP Super Cache did a pretty decent job, and was pretty simple to configure. While other caching options (nginx, varnish) will be able to sustain higher traffic, they aren't aware of the wordpress internals, so you'll need a way to invalidate their caches when the site gets updated. My advice is to just try WP Super Cache for size and see if that does the trick, since the effort involved is very minimal.

I've had good experience with xcache for PHP. It seems to handle variable data quite well provided you keep the TTL on the variable cache fairly short.

IIRC the PHP devs decided to include APC in newer versions, however you should still be able to switch back and forth.

There's also memcache, which I haven't used.

You can also set nginx to cache static content to web browsers.

@Piki:

I've had good experience with xcache for PHP. It seems to handle variable data quite well provided you keep the TTL on the variable cache fairly short.

IIRC the PHP devs decided to include APC in newer versions, however you should still be able to switch back and forth.

There's also memcache, which I haven't used.

You can also set nginx to cache static content to web browsers.

PHP 5.5 does indeed include Zend Opcache :)

I tried turning off apc and just using wp super cache, but then on calendar pages with ajax, they stopped working…so I have just apc on now. They're super fast like this, but thought it might be good to cache as much of the php as possible to bypass it. Even adding the calendar url strong in wp super cache, it didn't cache the page, but the ajax didn't work. Nginx is also set to cache static assets. A little mysql query cache is on as well.

Maybe I should just increase apc and mysql query cache size?

Increasing the cache size can help, but only if there's more to be cached and your Linode has enough space for it. You really have to experiment on your own with the cache sizes until you hit the magic values.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct