Cachify

描述

Cachify通过将文章、页面和自定义文章类型缓存为静态内容来优化页面加载。您可以选择通过数据库、Web 服务器硬盘 (HDD)、Memcached(仅限 Nginx)或 Redis 进行缓存。每当加载页面或文章时,都可以直接从缓存中提取。数据库查询和 PHP 请求的数量将急剧减少至零,具体取决于您选择的缓存方法。

功能

  • 适用于自定义文章类型。
  • 缓存方法:DB, HDD, Redis and Memcached。
  • WordPress 工具条中的 “清空缓存” 按钮。
  • WordPress Multisite 可用。
  • 可选的 HTML 标记压缩。
  • 文章和用户代理白名单。
  • 手动和自动缓存重置。
  • 自动缓存管理
  • 缓存对象的仪表板小工具。
  • Apache 和 Nginx 服务器的设置。
  • 可以通过 hooks/filters 扩展。

帮助

  • 通过 wordpress.org 支持论坛 获得社区支持。
  • 我们不处理通过电子邮件,Twitter,GitHub 等渠道提交的支持请求。

贡献

  • 该插件在在GitHub上进行开发。
  • 对有文档记录 Bug 的拉取请求非常受欢迎。
  • 如果你认为自己发现了一个 Bug (如: 遇到意外行为), 请先通过 支持论坛 提交。
  • 如果您想帮助我们翻译此插件,可以在WordPress Translate上进行

鸣谢

屏幕截图

  • Cachify 仪表盘小工具
  • Cachify设置
  • 管理栏中的“刷新缓存”按钮

安装

  • 如果你不知道怎么为 WordPress 安装插件, 请参考这里.

要求

  • PHP 5.6 或更高版本
  • WordPress 4.7 或更新版本
  • Memcached 配合 Nginx (可选)
  • Redis(可选,通过phpredis模块)

常见问题

使用硬盘缓存时没有缓存过期选项?

The cache expiration can not be considered due to technical reasons. If the cache stock has to be emptied at certain time intervals, then it is recommended to call a prepared PHP file by a cronjob.

PHP致命错误:无法在第0行的Unknown中的输出缓冲显示处理程序中使用输出缓冲

This error message may occur after commissioning the caching plugin. The hint appears because there are no cache files on the HDD for output. This is probably due to the fact that Cachify could not store files in the cache folder. Please check the write-permissions for the cache folder (found in the WordPress directory wp-content) and set them if necessary.

激活Cachify后,我的网站的某些部分损坏了!

Please make sure there is no issue that caused by the Cache minify feature. Just deactivate it or use HTML only. If the issue still exist please feel free to report it at the support forums. With this feature any unnecessary characters such as breaks and HTML comments are removed from the source code.

Cachify HDD:字符编码不正确

If you use Cachify to store the cache on HDD there is no PHP to run. In the case of misconfigured servers, this can lead to incorrect display of the special characters on web pages. The error can be corrected by an extension of the system file .htaccess: AddDefaultCharset UTF-8

Cachify支持CDN吗?

Currently the caching plugin for WordPress has no connection to a CDN provider. Although the Buzzword CDN (Content Delivery Network) is praised as a performance factor, CDN makes little sense for WordPress websites with a national audience. In this case, a home host could provide the requested files faster than a worldwide CDN service provider because the next node could be far away.

Cachify 什么时候自动刷新缓存?

  • 发布新文章后
  • 发布新页面后
  • 发布在你的自定义文章类型文章后
  • 发布新的计划文章后(尽在BD模式下有效)
  • 更新WordPress后
  • 点击了管理工具条上的「刷新缓存」按钮
  • 保存 Cachify 和 wpSEO 设置之后

默认不缓存网站的哪些部分?

  • 受密码保护的页面
  • 订阅源
  • 引用通告
  • 机器人爬虫
  • 预览
  • 移动主题 (WP-Touch, Carrington, Jetpack Mobile)
  • 搜索
  • 错误页面

缓存目录被搜索引擎索引

To ensure that Google and other search engines do not index the static contents of the cache folder (otherwise there could be duplicate content), the robots.txt file which is located in the main directory of a WordPress installation should be expanded by disabling the path to the cache file (disallow). This issue should only happen if you use a static robots.txt or you changed the wp-content location. And so might look a robots.txt:

User-agent: *
Disallow: */cache/cachify/
Allow: /

完整的文档可在 在线手册中找到。

评价

2021 年 7 月 21 日
I’m simply amazed at how simple and super quick this plugin is. Even if I was sponsored to use another caching plugin I simply wouldn’t!
2021 年 5 月 31 日
I rarely write review but this plugin is really well deserved. Certainly this is a reliable caching plugin can go against the major competitors out there. There are many reviews out there suggesting the load times are not as fast as other big players, but that is simply not true. I tested myself and can confirm this actually loads faster than those claimed to be faster in those popular reviews in the wild. This plugin only do 1 thing unlike its competitor and it nailed it! I particular like the built-in compatibility with other plugins I’ve used, non-intrusive at all, also the way it caches with its HDD mode, that’s how a real cache mechanism should work. I have been using many of the popular caching plugin in my production sites, until I gave Cachify a try, and I am a totally satisfied with it. The only concerns for some people is the manual configuration on the htaccess file to make it work, but that’s never an issue for me for just copy and paste a paragraph of setting into 1 file. Good work guys! Thank you for your great efforts developing this excellent plugin! Please keep this simple and free.
阅读所有47条评价

贡献者及开发者

「Cachify」是开源软件。 以下人员对此插件做出了贡献。

贡献者

「Cachify」插件已被翻译至 12 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「Cachify」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

2.4.0

Requires PHP 5.6 and WordPress 4.7 or above

  • New: introduce Redis (also KeyDB and Valkey) support using the phpredis module (#253), (#252, props @newtovaux)
  • New: add cachify_modify_output filter
  • New: add cachify_create_gzip_files to disable creation of static GZip files (#262, props @angcl)
  • New: add hooks cachify_removed_cache_by_url and cachify_flushed_total_cache for additional actions after clearing (#294, props @ouun)
  • Removed: APC support (#304)
  • Enhance: adjust styling for setup instructions (#215, props @timse201)
  • Enhance: update hooks for Multisite initialization in WordPress 5.1 and above (#246, props @ouun)
  • Enhance: rework flush hooks and add some third-party triggers for Autoptimize and WooCommerce (#225, props @timse201)
  • Enhance: clean up some internal error suppressions (#256)
  • Enhance: inform user on cache clear in admin bar (#257, props @angcl)
  • Enhance: do not flush the cache for post revisions (#261, props @angcl)
  • Enhance: prevent unnecessary cache clearing in some cases (#223) (#224, props @timse201)
  • Enhance: remove empty directories when clearing the HDD cache (#289)
  • Enhance: introduce common interface for caching backends (#298, props @lloc)
  • Enhance: enhance examples for .htaccess and nginx configuration (#302)
  • Enhance: show admin notice instead of silent fallback to DB cache, if selected backend is unavailable (#305)
  • Enhance: disable gzip creation of required PHP extension is missing (#308)
  • Enhance: various internal code clean ups
  • Fix: invalidate cache when permalink changes (#285, #286, props @raffaelj)
  • Fix: remove empty directories when pruning the HDD cache (#289)
  • Fix: correctly add user-agent to robots.txt (#282) (#283)
  • Fix: exclude sitemap.xml from caching (#242) (#254)
  • Fix: prevent cache generation of non-GET requests (#200) (#258)
  • Fix: prevent cache generation of requests with status different from 200 OK (#266) (#267, props @karlkowald)
  • Fix: prevent cache generation of non-HTML responses when using content negotiation (#265) (#273, props @Ancocodet)
  • Fix: fix styling for various dark mode plugins (#264) (#278)
  • Fix: fix SVG markup for icons in dashboard widget (#269, props @Latz)
  • Fix: added missing .gz suffix in htaccess (#287) (#291, props @raffaelj)
  • Fix: fix some brand names and unify spelling (#297, props @pedro-mendonca)
  • Maintenance: Tested up to WordPress 6.6

2.3.2

  • Fix: enforce WordPress environment for caching modules (#221, props timse201)
  • Fix: Remove unnecessary build artifacts from plugin deployment (#226)
  • Fix: Fix input sanitization for APC proxy (#240) (#241)
  • Maintenance: Remove unused language folder (#214, props timse201)
  • Maintenance: Update documentation links (#211, #212, props timse201)
  • Maintenance: Update documentation links (#213, props timse201)
  • Maintenance: More precise tags in README file (#216, props timse201)
  • Maintenance: Tested up to WordPress 5.8

2.3.1

  • Fix: clean up unused parameter evaluation after publishing a post to prevent PHP notice (#187) (#188)
  • Fix: correct minor spelling mistakes (#193, props timse201)
  • Fix: update support links (#194, props timse201)

2.3.0

  • New: WP-CLI integration (#165, props derweili)
  • New: cachify_flush_cache_hooks filter added to modify all hooks that flush the cache
  • New: Flush cache when a user is created / updated / deleted
  • New: Flush cache when a term is created / updated / deleted (#169, props derweili)
  • New: Cache behavior after post modification is now configurable in plugin settings (#176)
  • Enhance: Cache exceptions/User-Agents translation (#52, props timse201)
  • Enhance: Readme FAQ (#51, props timse201)
  • Enhance: sizeable exclusion boxes + placeholder (#53, props timse201)
  • Enhance: FAQ and Support links (#55, props timse201)
  • Enhance: Add text caption to “flush cache” button
  • Enhance: Icon font converted to SVG (#64)
  • Enhance: Improved HDD cache invalidation for hierarchical post types (#71, props Syberspace)
  • Enhance: Unified and shortened HTML signature across all caching methods (#108) (#109)
  • Security: Tabnabbing prevention (#55, props timse201)
  • Maintenance: Tested up to WordPress 5.4

2.2.4

  • 修复了混合 HTTPS 和 HTTP 设置的缓存
  • 修复了管理工具栏中图标样式的问题
  • 确保与最新的WordPress版本兼容

2.2.3

  • 新增:生成POT文件
  • 新增:添加德语翻译
  • 更新,翻译 + 格式化 README.md
  • 更新了插件和语言文件中过期的链接URL
  • 已更新 插件作者

2.2.2

  • 修复:通过过滤器dashboard_glance_items返回参数
  • 大量使用过滤器esc_html

2.2.1

  • 修复了WordPress Multisite上的PHP通知“对未定义函数is_plugin_active_for_network的调用”

2.2.0

  • 工具栏:在前端显示“刷新缓存”按钮
  • 工具栏:通过Hook控制“刷新缓存”按钮的显示

完整更新日志,请查看我们的 GitHub 仓库.