WordPress 缓存插件 WP File Cache 安装与使用

上篇文章《我是怎么对我的网站进行优化的(四):Speed》提到要写这么一个教程,那我就写一写吧!其实 WP File Cache 并“人如其名”,而是对 WordPress Object Cache 的优化。

介绍

The plugin implements object level persistent caching and can be used instead of the built in WordPress WP_Object_Cache. Unlike WP Super Cache, Hyper Cache and other plugins, WP File Cache does not cache the entire page; instead, it caches the data WordPress explicitly asks it to cache (using wp_cache_xxx() API functions). Although this means that the performance will be less than with, say, WP Super Cache, all your pages remain dynamic. WP File Cache won’t help you much if the plugins or theme you are using do not use WordPress Cache API. This is by design, since the plugin tries to play nice. However, for most WordPress installations this will not be critical.

简单来说,这个插件就是将 WordPress Object Cache 保存到文件(所以需要配合 WordPress Object Cache 使用,要不没那么明显的效果),这可是我们这些无法上内存缓存的小家伙的福音。明显的,这个插件要主机的硬盘 I/O 比较好才行。

不过,那些财大气粗,可以上内存缓存的家伙,就不要去使用了,用好你的内存缓存吧!无论怎么样,内存缓存总比文件缓存的效率高。

而且,这个插件不同于 WP Super Cache、Hyper Cache 等插件,所以,你安装完这个后,如果没有我那种特殊需求,你还可以在安装其它的缓存插件,会达到更明显的加速效果。

安装使用

怎么安装就不用我教了吧?后台搜索“WP File Cache”,安装即可。借用“大猫”的一句话:神马FTP时代,全部都过去了。

然后,勾上“Enable WP File Cache”和“Save cached data across sessions”,轻点下“Save Changes“,不必退出登录,如果你的主题优化的足够好的话,立刻就可以体验到飞一般的效果了。

安装后出现了一些莫名其妙的问题,怎么办?

So Easy!勾上“Do not use cache in the Admin Panel”,问题应该自解了。如果还不能解决,只能卸载插件了,说明你不适合用这个插件。

此文章是由nikbobo发表在旧博客分类目录的。将固定链接加入收藏夹。

关于 nikbobo

Nikbobo,本名刘永强,记忆空间站长,男,1998 年出生于广东茂名,至今(2022 年)23 岁,目前(2022 年)就读于广州大学华软软件学院,常以“nikbobo”这个网名混迹互联网。如无特殊注明,Nikbobo 在本站发表的文章,遵循 知识共享 署名-非商业性使用-相同方式共享 4.0 国际 许可协议。详情请参阅关于页面的作者介绍。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注