Linux 软件免费装
Banner图

Cache control by Cacholong

开发者 cacholong
preliot
更新时间 2021年7月20日 20:01
捐献地址: 去捐款
PHP版本: 5.6 及以上
WordPress版本: 5.7
版权: GPLv3
版权网址: 版权信息

标签

caching cache multisite schedule pagespeed cronjob WP-CLI fastcgi nginx network sites cache control cacholong nginx pagespeed nginx fastcgi cronjobs WP CLI CLI

下载

4.0.0 4.0.1 4.0.2 4.1.1 5.0.0 5.1.0 5.3.2

详情介绍:

“Cache control by Cacholong” plugin automates purging of Nginx Pagespeed cache and Nginx FastCGI cache on your Nginx server(s). It is a backend plugin that is able to: When will it purge? This plugin will work with default and custom post types. It will purge on a save, regular update, quick edit update, slug change, delete and undelete. The user is informed with one or more messages. There are a few caveats: It is possible to purge with Wordpress cronjobs. Adjust the 'Cronjob settings' to perform a daily purge of caches. You can also purge items manually. Go to the WordPress dashboard and navigate to: Settings Cronjob Settings hosts.json Hosts.json is a JSON file with information about one or more servers for this Wordpress installation. Remember that this file must contain information about all servers, including the one with this plugin. Default path is: wp-content/uploads/cacholong-cache-control/hosts.json. Here is an example of a hosts.json file: {"servers": [ {"name": "server1", "ip": "127.0.0.1", "pagespeed": true, "fastcgi": false}, {"name": "server2", "ip": "127.0.0.2", "pagespeed": false, "fastcgi": true}, ]} Each line contains information about one server. Parameters: When there is no hosts.json or the path is invalid, this plugin assumes the following: {"servers": [ {"name": "localhost", "ip": "127.0.0.1", "pagespeed": true, "fastcgi": true} ] ``} How does it work “Cache control by Cacholong” empties partial or full cache for Nginx Pagespeed and FastCGI cache. Wordpress HTTP API is used to make (post) request to specific urls to trigger purges. Based on the http header responses this plugin determines if a purge is successful or not. The user is informed with messages, which are loaded after a purge and page refresh. There are several settings to tweak purging, see Settings > Cache control. WP-CLI There are several commands available for the commandline with wp-cli. Commands generate text output which can be suppressed with --quiet. When an error occurs, text will always be displayed. WP-CLI exit codes Exit codes are 0 (no errors) or 1 (generic error). WP-CLI examples Purge command with all arguments: ``wp cacholong_cc purge [--cache=] [--ips=] Purge Nginx FastCGI: ``wp cacholong_cc purge --cache=fastcgi Purge Nginx Pagespeed: ``wp cacholong_cc purge --cache=pagespeed Purge all caches: wp cacholong_cc purge --cache=allwp cacholong_cc purge Purge Nginx Pagespeed cache for ip address 127.0.0.1 and 127.0.0.2: ``wp cacholong_cc purge --cache=pagespeed --ips=127.0.0.1,127.0.0.2 Purge all caches for ip address 127.0.0.1 and 127.0.0.2: ``wp cacholong_cc purge --ips=127.0.0.1,127.0.0.2 Factory reset options for given site_id or current blog if no site_id is given: ``wp cacholong_cc factory_reset [--site_id=site_id] Debug Plugin will only log information when WP_DEBUG is true (can be set in wp-config.php). Logs information in file wp-content/cacholong-cache-control.log.

安装:

Minimum Requirements Within the configuration of Nginx the variable $_SERVER[‘CC_NGINX_FASTCGI_CACHE_PATH’] must be provided containing the correct NGINX FASTCGI cache path. For documentation regarding Nginx setup please follow this link http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html. Optional Requirements Automatic installation
  1. Log in to your WordPress dashboard and navigate to the plugins menu.
  2. Click “Add New”.
  3. Search for “Cache control by Cacholong”.
  4. Once you find this plugin, click “Install Now”.
  5. Activate the plugin
  6. Configure the plugin at Settings > Cache control
Manual installation
  1. Log in to your WordPress dashboard and navigate to the plugins menu.
  2. Click “Add New”.
  3. Click “Upload Plugin”.
  4. Locate zip file on your computer and click “Install Now”.
  5. Activate the plugin
  6. Configure the plugin at Settings > Cache control
Updating Although updates are thoroughly tested, make a backup of your website (files and database) before you install an update.

屏幕截图:

  • “Cache control by Cacholong" settings panel.

升级注意事项:

4.0.0 - 2018-01-26
  • Must deinstall older version when installing version 4.0.0, because of breaking changes. Make sure you make backups of your files and database before you proceed.

常见问题:

Why doesn't this plugin work?

This plugin has several requirements. Please check the minimum and optional requirements, before installing this plugin. Open a support topic if you require additional help.

When i use “Quick edit” to edit a post, nothing is happening!

Although no message is displayed, the purge was activated! You can see the purge message when you refresh the page. This is a technical limitation.

Why do my cronjobs execute later then I expect?

Wordpress cronjobs are not the same as real cronjobs. Wordpress cronjobs will start if someone visits your website after (or on the) scheduled time. This might be later then expected. It is possible to disable Wordpress cronjobs and use a real cronjob that polls wp-cron.php on a regular base.

Why does my cronjob execute immediately?

If you enter a time of day that has already passed, the first cronjob is set to this time of day and is executed the first time the site is loaded (or wp-cron.php is called).

What should I do when Wordpress cronjobs are disabled?

Wordpress cronjobs are disabled ('DISABLE_WP_CRON' = true). Please use a different type of cronjob to poll wp-cron.php on a regular base. If cronjob cache purging fails make sure the hosts.json file is in place with the proper settings. See hosts.json section on the plugins page for more details.

更新日志:

5.3.2 - 2021-04-15 5.3.1 - 2021-04-15 5.3.0 - 2021-04-15 5.2.0 - 2021-03-10 5.1.1 - 2020-12-14 5.1.0 - 2020-11-18 5.0.1 - 2020-09-30 5.0.0 - 2019-11-13 See changelog.txt for all versions.