2011年1月11日 发表评论 阅读评论

wordpress缓存插件众多,其中较常使用只有7款,他们的优点和缺点以及大致的作用原理,本文将为你一一道来。WP Super Cache、DB Cache、Hyper Cache、cos-html-cache、Autoptimize、Batcache和WP Widget Cache。


WP Super Cache


This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.
WP Super Cache是wordpress缓存类插件的龙头老大。开启之后,它会生成静态HTML文件,从而达到缓存的目的。它的效果非常显著。

DB Cache


This plugin caches every database query with given lifetime. It is much faster than other html caching plugins and uses less disk space for caching.
DB Cache的缓存方式就和前两位大师有些不一样。它的作用是是缓存数据库连接的query,而不会进行页面的缓存。也就是说,所有用到数据库连接的地方,从数据库读出的数据,都会被缓存。它的效果也很不错。一般能降低十多个query数。但不太好的地方是,在后台的query也会被缓存,这样当你进行一些查看、修改操作时,会出现莫名其妙的明明已经修改却没有变化的怪事。那就是db cache的功劳了。

Hyper Cache


Hyper Cache is a new cache system for WordPress, specifically written for people which have their blogs on low resources hosting provider (cpu and mysql).
Hyper Cache和WP Super Cache的实力不相上下,同样会进行HTML静态化处理。也有很多朋友推崇。



cos-html-cache is an extremely efficient WordPress page caching plugin designed to make your WordPress site much faster and more responsive. Based on URL rewriting, the plugin will automatically generate real html files for posts when they are loaded for the first time, and automatically renew the html files if their associated posts are modified.
cos-html-cache是国人的产品,它能够完全的实现静态化。但有人反应过一些问题,比如内建的搜索失效,分页无法静态化,trackback也是.html/trackback,都出现404, 有时无法评论,post-views无法使用的情况。所以还期待进一步完善。



Autoptimize makes optimizing your site really easy. It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head, and scripts to the footer. It also minifies the HTML code itself, making your page really lightweight.
Autoptimize又是自成一派。它把所有JS, css进行压缩,并调整代码的顺序。Autoptimize会把整个页面的size大大缩小,从而达到加速访问的目标。



Batcache uses Memcached to store and serve rendered pages. It’s not as fast as Donncha’s WP-Super-Cache but it can be used where file-based caching is not practical or not desired.
这个是比较高端的缓存插件了,human慎用, geek跟上。

WP Widget Cache


WP Widget Cache can cache the output of your blog widgets. Usually it will significantly reduce the SQL queries to your database and speed up your site.
如果你的博客边栏很少改动的话,WP Widget Cache会是一个很好的助手。它专门用来缓存widget的。


分类: Wordpress 标签:
  1. 现金棋牌
    2014年1月16日06:37 | #1