The plugin implements object level persistent caching and can be used instead of the built in WordPress
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-config.php Magic Constants
There is one magic constant,
ini_get('memory_limit') - memory_get_usage() becomes less than
WP_FILE_CACHE_LOW_RAM, caching gets partially disabled.
This means that the data that are available in the memory cache will still be used but no reads from the files will be performed. This can be useful when you get Out of Memory errors in
By default this feature is turned off but you can enable it with defining
4M with your value.
- Please make sure that
wp-contentdirectory is writable by the web server: the plugin will need to delete
- Deactivate/uninstall the plugin through the ‘Plugins’ menu in WordPress.
- Please verify that
wp-content/object-cache.phpfile was removed.
wp-file-cachefolder to the
- Please make sure that
wp-contentdirectory is writable by the web server: the plugin will need to copy
object-cache.phpfile into it.
- Make sure that
wp-content/object-cache.phpfile exists. If it is not, please copy it from
wp-content/object-cache.phpfile wust me writable by the server since plugin stores its options in that file.
- That’s all 🙂
- After activating the plugin I see an error: “Warning: file_exists(): open_basedir restriction in effect. File(`filename`) is not within the allowed path(s)”. What to do?
A1: Try to get rid of
open_basedirform your php.ini/Apache config.
open_basediris considered a “broken” security measure anyway and only slows down file operations.
A2: If disabling
open_basediris not an option, set the
Cache locationunder the Settings > WP File Cache Options to the directory that satisfies the
- The plugins does not work with Custom Field Template plugin.
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_metato the list of the non-persistent groups (Settings > WP File Cache Options)
WP File Cache はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。貢献者
126.96.36.199 (Dec 16, 2010)
- Fixed stupid bug
1.2.9 (Dec 15, 2010)
- Ability to disable caching when memory is low
188.8.131.52 (Apr 8, 2010)
- Suppress ‘stat failed’ warning for
184.108.40.206 (Apr 7, 2010)
- Save options bug fix
1.2.8 (Mar 27, 2010)
- Added Ukrainian translation (props Andrey K.)
- Fixed typos in readme.txt
1.2.7 (Mar 12, 2010)
- Option to always use fresh data in the Admin Panel
- Added Belarussian translation (props Antsar)
1.2.6 (Mar 6, 2010)
- Updated FAQ
- Added an experimental option to partially disable the cache in the Admin panel
1.2.5 (Feb 15, 2010)
- Data to be cached are not passed by reference anymore to ensure there are no side effects
- Objects are cloned before caching to avoid any side effects
1.2.4 (Feb 14, 2010)
- Fixed wrong directory name
1.2.3 (Feb 12, 2010)
- readme.txt bug fix
1.2.2 (Feb 12, 2010)
- Compatibility with WP 3.0
1.2.1 (Jan 14, 2010)
- optimized the code, speeded up
FileCacheclass methods by moving all sanity checks to
- file lock on write
- less system calls are used
- compatibility with WordPress 2.6
- plugin won’t cause WSoD if the plugin is deleted but wp-content/object-cache.php file is not
1.1 (Dec 19, 2009)
- Fixed serious floating bug in
1.0 (Dec 2, 2008)
* Really do not remember
0.2.1 (Jun 12, 2008)
- First public release