Welcome to the first unified way to benchmark your hosting using simple Wordpress plugin.
A simple way to find out if your server is fast or needs an upgrade.
Object cache is a set of functions, that allows theme and plugin developers to store different data using unique keys in a usually in-memory systems, like Redis or Memcached for faster access. Unlike database, to get information out of the object cache you need to know specific key, that you are looking for, but at the same time access to stored data is much more faster.
Wordpress offer natively offers functions for dealing with object cache, but unless you have a specific plugin, that connects to external cache daemon to store or retrieve data - all object cache will be stored inside running PHP process and data will be lost after request handling. Basically it means, that on a new request - object cache will be empty. And that's why you need external cache daemon and a plugin, that will actually work with it.
Since object cache itself is not bound to specific storage - Wordpress plugin repository offer various plugins, that utilize different methods for data storage - redis object cache, memcached, opcache and even file-based caching (it is hard to think, when this might be a good idea to have, but technology itself allows us to do it).
Modern server hardware has become very very fast. Even shared hosting nowadays often offers excellent performance. Not last to mention is number of other caching plugins, that allows you to cache individual pages or whole sites. Therefore you should understand, when you can really benefit from using object cache and when you should worry about its performance.
The most common example is a webshop, where you can not statically store number of available products. Other example might be an online multiplayer game, where several gamers are interacting with an object, post or item. Use of external fast object cache can offload your database server and improve site responsivness.
Or why my object cache tests fail. - Yes. You may have object cache plugin, but benchmark tests still may show, that it is not working. Especially this is true for W3TotalCache. If you dig through the settings - you will find a setting, that enables object cache for logged users and wp-admin interface. This option is disabled by default.
This is bad, very bad and here is why - imagine, that for some visitors - data is being served from object cache and for some - directly from the database. There can occur situation, when these 2 visitors get different values. Or - for example - administrator updating information about a product, but customers still accessing or even updating wrong values. Therefore - you should make sure, that object cache, if active, works in all parts of your Wordpress.
Without going too deep into technology - I would not suggest enabling object cache with Redis or Memcached backends when being hosted on a shared hosting due to security reasons. In most cases your data will not be protected and may be accesses or modified by others. If you feel, that your website is slow - simply look for faster hosting company. Object cache would only give you fractional improvement on a specific use case.
Fast CPU, faster disk and faster MySQL database would have much more greater effect on your website performance, than object cache, especially in a shared hosting environment.
Your questions, comments and suggestions are kindly welcome at [email protected].