Applicability Analysis of WordPress cache Plug-ins

Source: Internet
Author: User
Keywords WordPress caching

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

WordPress is a blog platform developed using the PHP language, and users can build their own blogs on servers that support PHP and MySQL databases. WordPress can also be a powerful plug-in function, the WordPress becomes a Content management system (CMS) to use. WordPress under the most famous cache plug-ins have two, respectively, by international friends Donncha O Caoimh Development of WP super cache and the domestic talent jiangdong development Cos-htm-cache.

Of course, from the popularity and popularity of the degree, of course, WP Super cache is the top of the WordPress caching plugin top! However, after my analysis, I found that these two plug-ins have advantages and disadvantages, respectively, applicable to different situations. This is the WP super cache caching mechanism decided. WP Super cache itself does not actually generate HTML files (This is why WP super CACHE can cache non-HTML as the end of the URL reason), he just generated cache files.

So when users visit a page, WP Super Cache first query cache files, see whether the file has been cached: If not yet cached, PHP parsing and database query, in the foreground to generate Web page files cache the file for subsequent visitors to browse; The direct call cache is displayed in the foreground without PHP parsing and database queries.

If the user did nothing, just browse the content they need to close the page, then WP super cache to stop working, waiting for the next visitor; if the netizen leaves a message, add the new data to the database and write to the cache. And WP Super cache has a caching expiration mechanism, when the preset time arrives, the cache expires and needs to be regenerated. This is WP super cache working mechanism. For Cos-html-cacahe, it's another case. Cos-html-cacahe itself can generate completely static HTML Web page files that can be completely detached from the database.

When a page is first accessed, PHP parsing and database query, and in the foreground to generate Web page files, if the user did not do anything to leave the page, then in the corresponding physical directory to generate HTML files; If the user leaves a message, the newly added data is written into an HTML file and stored in the corresponding physical directory. Later, all visitors to the page, directly call the corresponding HTML file, without PHP parsing and database queries, until a user has a new message, which is to write new data to the database and rebuild the HTML file. This is the working mechanism of Cos-html-cacahe.

After analyzing the caching mechanism of two kinds of plug-ins, we can draw a conclusion:

WP Super cache for netizens often message blog, and Cos-html-cacahe is applicable to large flow but the message is not frequent blog. This is because WP super cache caching mechanism is "supplemental Method", with new things added to the cache, and Cos-html-cacahe is the "new manufacturing Method", with new content, the complete reconstruction of a file.

Under this caching mechanism:

If some blog is very popular, there are a number of loyal fans, often log on the message, then use WP super cache is appropriate, because this plug-in in the new data added to the server pressure is small, and the use of Cos-html-cacahe is not appropriate, Because this plug-in will repeatedly generate HTML files, but will increase the burden on the server, reduce access speed.

But some blogs, netizens often find them through the search engines, after reading the content of their own needs, not leaving a message, but to leave, the use of Cos-html-cacahe is more appropriate, because there is no new data increase, and HTML display speed is the fastest! But this kind of blog uses WP Super cache is not appropriate, because the WP super cache will not stop the expiration of the cache, to regenerate the cache (when in fact, there is no additional data), is tantamount to doing no work, but to reduce the burden on the server, reducing the speed.

So, using WordPress blog friends, please analyze what kind of situation you belong to, and then choose a suitable for their own cache plug-ins, and not blindly superstitious brand.

This article by the Young Master original, reprint must indicate the link: www.feelarch.com.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.