开发者 | vladimir_kolesnikov |
---|---|
更新时间 | 2010年12月16日 16:37 |
捐献地址: | 去捐款 |
PHP版本: | 2.6 及以上 |
WordPress版本: | 3.1 |
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.
WP File Cache significantly reduces the load from your database. Say, my blog's home page without the plugin executes 24 queries (0.02403 sec); with the plugin enabled, only 4 queries (0.00188 sec).
Unlike DB Cache/DB Cache Reloaded, the plugin will work in the Admin Panel and supports all plugins that use WordPress Cache API.
Please note that WP File Cache shifts the load from your database to your disk/file system and if Disk I/O is a bottleneck, file based caches will not help you.
To get the maximum cache performance, please disable open_basedir
in your php.ini
— it really slows the things down.
WARNING: chances are that the plugin will not work when PHP safe mode is enabled and web server is operated by a different user than owns the files.
wp-file-cache
folder to the wp-content/plugins/
directory.wp-content
directory is writable by the web server: the plugin will need to copy object-cache.php
file into it.wp-content/object-cache.php
file exists. If it is not, please copy it from wp-content/plugins/wp-file-cache/object-cache.php
wp-content/object-cache.php
file wust me writable by the server since plugin stores its options in that file.filename
) is not within the allowed path(s)". What to do?A1: Try to get rid of open_basedir
form your php.ini/Apache config. open_basedir
is considered a "broken" security measure anyway and only slows down file operations.
A2: If disabling open_basedir
is not an option, set the Cache location
under the Settings > WP File Cache Options to the directory that satisfies the open_basedir
restriction.
This is because Custom Field Template maintains its own cache for the post meta data which gets out of sync with WordPress cache. Please add cft_post_meta
to the list of the non-persistent groups (Settings > WP File Cache Options)
filemtime
FileCache
class methods by moving all sanity checks to wp_cache_xxx()
functionsFileCache::get()