Many hosting providers now have an inbuilt server-side caching technology. So are you might be wondering whether you need a separate cache plugin?
I’ve also seen a few hosting providers telling me that they don’t need to use the cache plugins because they’ve server-side caching.
But is that enough?
What is Server-Side Cache?
When a request reaches your server, WordPress has to execute a lot of PHP scripts and MySQL scripts.
Every time you open a page/post, it has to execute a minimum of 27 MySQL queries. 27 is the default queries count, it may be 50 or 100 depends on your theme and the number of plugins installed. Each of these queries may take a few milliseconds depending on the size of the SQL query and the data in your database.
Summing up all these PHP and MySQL executions, your TTFB (Time to First Byte) can be around a second or even more.
Server-side caching eliminates this process by storing copies of the generated HTML in disk/memory. This reduces TTFB and lowers server resource usage. Because the server only needs to serve that generated file.
Different hosting providers have different server-side cache solutions. The most common one is FastCGI caching in Nginx servers. Varnish, Redis, Memcache etc are also similar caching layers.
If you cache HTML pages in Cloudflare, it’s also a sort of server-side cache.
What Cache Plugins do that Server Side Caching can’t?
Most of the cache plugins generate HTML pages just like in server-side caching. But cache plugins can do more front-end optimizations that server-side cache can’t.
Here are a few:
- Generate critical path css – Improves FCP (First Contentful Paint), which now a ranking factor in Google SERP.
- Lazy loading – Lazy load images, videos, embeds etc.
There are a lot more features depending on the cache plugin you use.
I recommend FlyingPress for caching.
So in short, do I need a cache plugin with server-side cache? The answer is YES!