If you have multiple hosting plans where one plan has root-level access, or if your WordPress hosting provider offers addons or bundles providing one of the following solutions, you may offload your in-memory caching to another server. This allows you to separate your actual site and caching solution between multiple servers to compliment each other, and allows for easier scaling to serve many users.
Speed Up Your WordPress Website.
A Difference of Just 100ms in Page Load Speeds Can Cause a Visitor to Prefer Your Competitor’s Website.
Page Caching Methods
Memcached
Memcached is a high-performance, distributed memory object caching system meant to speed up dynamic web applications by alleviating database load. It provides an in-memory key-value store for small chunks of arbitrary data (strings, objects) from the results of database calls, API calls, or page rendering.
Memcached is ideal for relatively small and static data, and as a result may be more efficient than Redis in smaller data sets. It is also multi-threaded, which may be a benefit when using a VPS or Dedicated Server with a large resource pool.
Redis
Redis is an in-memory data structure store which may be used as a database, cache, and message broker. Redis is somewhat of an industry-standard at the time of writing, and can be defined simply as a superset of Memcached when purely talking about similarities between each feature set.
Memcached + NGINX (Recommended)
This method is usually the fastest because cached data is always stored in memory and cached requests are processed without PHP. It combines the power of the Disk: Enhanced and Memcached options.
Caveats
Using an in-memory cache on another asset will assist with exceeding any disk-based performance issues, however you may run into issues if your traffic exceeds your available bandwidth as this requires fetching assets over a network. Offloading your caching to another server may not greatly decrease your site’s response time due to the extra HTTP transactions, though it will allow many more users to interact with your site simultaneously.
An additional concern is that requests to in-memory caches are generally handled by PHP scripts, which is considered to be slower than Disk: Enhanced.
W3 Total Cache
You haven't seen fast until you've tried PRO
Full Site CDN + Additional Caching Options
Advanced Caching Statistics, Purge Logs and More
Everything you need to scale your WordPress Website and improve your PageSpeed.
Hilal says:
I am on Google Cloud Platform using 8 vCPUs and 16 GB memory. I’m on an Apache server using Linux 4.9.0-14-amd64 x86_64 and PHP7. I have memcached available. What do you recommend my setup be? For page cache, minify, object and database cache (I found conflicting advice on WordPress support forum, claiming I don’t need to enable database caching if I have object caching and fragment caching enabled). Thank you in advance for your help.
Jesse says:
Hi Hilal-
Many users find that using a cache engine is actually slower than using MySQL or MariaDB calls, unless your site has a lot of complex queries on each page. Most users will find that leaving Database caching off will be better for their use case. Objects and fragments will generally get the job done, but it really depends on your individual circumstance.
Hilal says:
Appreciate the response—thank you for your help. Do you recommend using memcached for minify for my setup?
Joseph says:
Hi Hilal!
Since you have memcached available on your server using it for minification should help improve your website’s performance.
Please let us know if you have any other questions for us!
Fabio says:
Hi there!
what about use apcu with a single Vps? its not memcache to multiple servers? …
i mean.. whats better?
Jesse says:
Hi Fabio-
If you’re using a single server, APCu is a good alternative for in-memory key-value storage, but it’s limited in that it can only perform object caching, and not opcode or database caching.
Fabio says:
so im on a 4gb ram vps do u recommend memcached > apcu?
im able to activate memcached.
Jesse says:
Hi Fabio-
In this situation, I’d recommend using either Redis or Memcached for Page, Minify, and Database Cache. You can still use APCu for object and opcode caching, because it will be more efficient at storing opcode cache.
Jenny says:
Do you have any recommended install guides for Memcached, Redis, and NGINX?
Jesse says:
Installation instructions are going to be a little different depending on your host and server. First, I’d recommend searching your web host’s instructions, but if you don’t find any, I’m a big fan of Digital Ocean’s installation guides, like these ones for Memcached on CentOS 7, Redis on CentOS 7, and NGINX on CentOS7.
Dixit says:
i didnt find memcache extension in my w3 total plugin. so i selected Disk Enhanced,
i have cloud server service.
Plz Suggest
Jesse says:
Hello Dixit,
The memcached option will show as unavailable if the plugin detects that the service is not installed on your server. If you need help getting this set up, please reach out in the official W3 Total Cache support forum and our team will be happy to assist.