最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What is difference between 'Page Cache' and 'Object Cache' in WordPress?

programmeradmin2浏览0评论

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'?

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'?

Share Improve this question asked Jul 3, 2019 at 12:37 Nilesh GNilesh G 1829 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 2

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.

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.

发布评论

评论列表(0)

  1. 暂无评论