开发者 | chrisvendiadvertisingcom |
---|---|
更新时间 | 2017年1月4日 05:39 |
PHP版本: | 3.9 及以上 |
WordPress版本: | 4.7.0 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
The authors of this plugin are not affiliated with Wordfence. The caching engines used by this plugin were ported from Wordfence's code after they decided to remove them from their codebase.
No, but it does replace a feature that they will be removing soon. Wordfence is one of the best security plugins available for WordPress and for about 2 years their product included a very awesome caching engine. In October of 2016 they decided that they would be removing this caching engine which is why this plugin was created.
Yes, the caching engine may be stopped for a given request in several ways. The preferred way (as of 1.2.0) is via a filter: add_filter( \Vendi\Cache\api::FILTER_NAME_DO_NOT_CACHE, '__return_true' )
. For legacy reasons we also still support a public static method \Vendi\Cache\api::do_not_cache()
. Lastly, if you wish to globally stop the caching engine site-wide you can define the WFDONOTCACHE
constant somewhere in your code.
For historical reasons, if defined the global constant is always honored first and cannot be undone via the filter. This might be changed in the future if someone actually has a need for it but generally speaking, constants are used to make global changes by administrators that local code should not be able to undo.
\Vendi\Cache\api::FILTER_NAME_DO_NOT_CACHE
(preferred) and function \Vendi\Cache\api::do_not_cache()
(legacy) to allow people to disable caching per request.cache_stats
class to use instead of array, make strings translatable.clear_entire_cache
to public API.