[wordpress插件] Cache control by CacholongCacholong的缓存控制

wordpress 插件 文章 2020-03-15 10:30 487 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

“Cache control by Cacholong” plugin automates purging of Nginx Pagespeed cache and Nginx FastCGI cache on your Nginx server(s).

“由Cacholong进行的缓存控制”插件可自动清除Nginx服务器上的Nginx Pagespeed缓存和Nginx FastCGI缓存。

It is a backend plugin that is able to:

这是一个后端插件,可以:

    • Purge Nginx Pagespeed cache and/or Nginx FastCGI cache.
    • 清除Nginx Pagespeed缓存和/或Nginx FastCGI缓存。

    • Purging automatically, manually and with WordPress cronjobs.
    • 使用WordPress cronjobs自动,手动进行清除。

    • Purge caches on one or more servers (See hosts.json section for more details).
    • 清除一台或多台服务器上的缓存(有关更多详细信息,请参见hosts.json部分)。

    • Remove id tag from stylesheet link tags, in order to allow Nginx Pagespeed to combine stylesheets.
    • 从样式表链接标记中删除id标记,以允许Nginx Pagespeed组合样式表。

    • Allow purging of other cached items (see Settings > Cache control).
    • 允许清除其他缓存的项目(请参阅设置>缓存控制)。

    • Inform user of purge status.
    • 通知用户清除状态。

    • Support for single site and network sites
    • 对单个站点和网络站点的支持

    • Support for WP-CLI
    • 对WP-CLI的支持

    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:

    有一些警告:

      • When a user is using the Gutenberg editor, purge messages will not be displayed.
      • 当用户使用Gutenberg编辑器时,将不会显示清除消息。

      • When the user uses “Quick edit” and “Updates” the post, no messages will be displayed, because there’s no page refresh.

      • 当用户使用“快速编辑”和“更新”帖子时,将不会显示任何消息,因为不会刷新页面。

        Those messages will be shown on the next request.

        这些消息将在下一个请求中显示。

      It is possible to purge with WordPress cronjobs.

      可以清除WordPress cronjobs。

      Adjust the ‘Cronjob settings’ to perform a daily purge of caches.

      调整“ Cronjob设置”以每天清除缓存。

      You can also purge items manually.

      您还可以手动清除项目。

      Go to the WordPress dashboard and navigate to:

      转到WordPress仪表板并导航至:

        • Settings > Cache control > purge single item
        • 设置>缓存控制>清除单个项目

        • Settings > Cache control > purge all caches
        • 设置>缓存控制>清除所有缓存

        • Admin Toolbar > purge all caches
        • 管理工具栏>清除所有缓存

        Settings

        设置

          • File with hosts (JSON): File with information about one or more hosts for this WordPress installation.

          • 带有主机的文件(JSON):此WordPress安装文件中包含有关一个或多个主机的信息的文件。

            See hosts.json section for more details.

            有关更多详细信息,请参见hosts.json部分。

          • Pagespeed optimized CSS: Remove ID tag from all WordPress stylesheet link tags to improve Nginx Pagespeed caching.
          • Pagespeed优化的CSS:从所有WordPress样式表链接标签中删除ID标签,以改善Nginx Pagespeed缓存。

          • Purge settings default post types: Select one or more options when purging a default post type.

          • 清除设置默认帖子类型:清除默认帖子类型时选择一个或多个选项。

            Possible to purge post url (default), home page, all connected WordPress categories or all caches.

          • 可以清除发布网址(默认),主页,所有已连接的WordPress类别或所有缓存。

          • Purge settings default custom type(s): Select one or more options when purging a custom post type.

          • 清除设置默认的自定义类型:清除自定义帖子类型时,选择一个或多个选项。

            Possible to purge post url (default), home page, all connected WordPress categories or all caches.

          • 可以清除发布网址(默认),主页,所有已连接的WordPress类别或所有缓存。

          Cronjob Settings

          Cronjob设置

            • Cronjob purging: Enable or disable cronjob purging.

            • Cronjob清除:启用或禁用cronjob清除。

            • Cronjob time of each day: Enter HH:MM in 24 hour notation for cronjob time of day.

            • 每天的cronjob时间:以24小时表示法输入HH:MM作为一天的cronjob时间。

              Will fallback to 00:00 when wrong format is given.

            • 格式错误时将回退至00:00。

            • Purge caches Select caches to purge on given cronjob time.

            • 清除缓存选择要在给定的cronjob时间清除的缓存。

            hosts.json

            hosts.json

            Hosts.json is a JSON file with information about one or more servers for this WordPress installation.

            Hosts.json是一个JSON文件,其中包含有关此WordPress安装的一台或多台服务器的信息。

            Remember that this file must contain information about all servers, including this one.

            请记住,此文件必须包含有关所有服务器的信息,包括该服务器。

            Default path is: /uploads/cachelong-cache-control/hosts.json.

            默认路径为:/uploads/cachelong-cache-control/hosts.json。

            Here is an example of a hosts.json file:

            这是hosts.json文件的示例:

            {"servers":    

              {“服务器”:    

            [        

            [        

            {"name": "server1", "ip": "127.0.0.1", "pagespeed": true, "fastcgi": false},        

            {“ name”:“ server1”,“ ip”:“ 127.0.0.1”,“ pagespeed”:true,“ fastcgi”:false},        

            {"name": "server2", "ip": "127.0.0.2", "pagespeed": false, "fastcgi": true},    

            {“ name”:“ server2”,“ ip”:“ 127.0.0.2”,“ pagespeed”:false,“ fastcgi”:true},    

            ]

            ]

            }

            }

            Each line contains information about one server.

            每一行包含有关一台服务器的信息。

            Parameters:

            参数:

            name string Name of host, something to identify this server.

            name字符串主机名,用于标识此服务器。

            ip string IP address of server or full url.

            ip字符串服务器或完整URL的IP地址。

            Format: scheme://host:port/path

            格式:scheme:// host:port / path

            pagespeed bool Server uses Nginx Pagespeed (true) or not (false)

            pagespeed bool Server使用Nginx Pagespeed(真)还是不使用(假)

            fastcgi bool Server user Nginx FastCGI (true) or not (false)

            fastcgi bool服务器用户Nginx FastCGI(true)或不是(false)

            When there is no hosts.json or the path is invalid, this plugin assumes the following:

            当没有hosts.json或路径无效时,此插件将假定以下内容:

            {"servers":    

              {“服务器”:    

            [        

            [        

            {"name": "localhost", "ip": "127.0.0.1", "pagespeed": true, "fastcgi": true}    

            {“ 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.

            “ Cacholong的缓存控制”清空Nginx Pagespeed和FastCGI缓存的部分或全部缓存。

            WordPress HTTP API is used to make (post) request to

            WordPress HTTP API用于向以下对象发出(发布)请求

            specific urls to trigger purges.

            触发清除的特定网址。

            Based on the http header responses this plugin determines if a purge is successful or not.

            根据http标头响应,此插件确定清除是否成功。

            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.

            有一些设置可以进行清除,请参见“设置”>“缓存控制”。

            Debug

            调试

            Plugin will only log information when WP_DEBUG is true (can be set in wp-config.php).

            仅当WP_DEBUG为true(可以在wp-config.php中设置)时,插件才会记录信息。

安装步骤

Minimum Requirements

最低要求

    • WordPress 4.3.1+
    • WordPress 4.3.1 +

    • Nginx server with fastcgi_cache enabled

      已启用fastcgi_cache的Nginx服务器

      Within the configuration of Nginx the variable $_SERVER[‘CC_NGINX_FASTCGI_CACHE_PATH’] must be provided containing the correct NGINX FASTCGI cache path.

      在Nginx的配置中,必须提供变量$ _SERVER [‘CC_NGINX_FASTCGI_CACHE_PATH’],其中包含正确的NGINX FASTCGI缓存路径。

      For documentation regarding Nginx setup please follow this link http:/ginx.org/en/docs/

      有关Nginx设置的文档,请访问此链接 http:/ginx.org/en/docs/

      httpgx_http_fastcgi_module.html.

      http / ngx_http_fastcgi_module.html 。

    Optional Requirements

    可选要求

      • hosts.json file.

      • hosts.json文件。

        File contains information about hosts and which caches are active.

        文件包含有关主机以及哪些高速缓存处于活动状态的信息。

        See hosts.json section for more details.

        有关更多详细信息,请参见hosts.json部分。

        When not available, plugin assumes localhost with all caches active.

        当不可用时,插件将假定localhost处于活动状态。

      Automatic installation

      自动安装

        1. Log in to your WordPress dashboard and navigate to the plugins menu.
        2. 登录到WordPress仪表板并导航到插件菜单。

        3. Click “Add New”.
        4. 单击“添加新”。

        5. Search for “Cache control by Cacholong”.
        6. 搜索“ Cacholong的缓存控制”。

        7. Once you find our plugin, click “Install Now”.
        8. 找到我们的插件后,点击“立即安装”。

        9. Activate the plugin
        10. 激活插件

        11. Configure the plugin at Settings > Cache control
        12. 在“设置”>“缓存控制”中配置插件

        Manual installation

        手动安装

          1. Log in to your WordPress dashboard and navigate to the plugins menu.
          2. 登录到WordPress仪表板并导航到插件菜单。

          3. Click “Add New”.
          4. 单击“添加新”。

          5. Click “Upload Plugin”.
          6. 点击“上传插件”。

          7. Locate zip file on your computer and click “Install Now”.
          8. 在计算机上找到zip文件,然后单击“立即安装”。

          9. Activate the plugin
          10. 激活插件

          11. Configure the plugin at Settings > Cache control
          12. 在“设置”>“缓存控制”中配置插件

          Updating

          更新

          Although our updates are thoroughly tested, make a backup of your website (files and database) before you install an update.

          尽管我们的更新已经过全面测试,但是在安装更新之前,请对您的网站(文件和数据库)进行备份。

          Just to be sure!

          只是为了确定!

下载地址
https://downloads.wordpress.org/plugin/cache-control-by-cacholong.zip
-EOF-

AI助手支持GPT4.0