Question

I am optimizing my WordPress website. I am using 2 WordPress plugins right now. First one is 'Autoptimize' for optimizing CSS, JS, and HTML. And another one is 'WP Super Cache' for caching pages.

While reading about WordPress optimization, I came across another term called 'Object Caching'. But I still can't figure out the difference between 'Page Cache' and 'Object Cache'.

Can someone help me understand this? Is 'Object Cache' needed even if I am using 'Page Cache'?

Was it helpful?

Solution

Page cache is the entire rendered html output for a page. It's useful for serving static content like a WordPress post.

Object cache is often the resource-heavy pieces that make up a page. For example, When you use WP_Query each result would be stored in object cache. This prevents WordPress from hitting the database every time WP_Query is used.

For example, if you use ajax for pagination, the next page of results would be stored in object cache and not in page cache.

OTHER TIPS

Page Cache When Visitor ‘A‘ requests a page, the website will build it and return this page ‘content’ to the visitor’s browser. With Page Cache running, this page content is saved so that it doesn’t need to be rebuilt if someone else asks for it. Then, when visitor ‘B‘ comes along and requests the same page, the page cache simply sends out the previously cached content (without having to rebuild anything).

Object Cache Object caching involves storing database queries and, when enabled on your WordPress site, it can help speed up PHP execution times, reduce the load on your database, and deliver content to your visitors faster.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top