AI助手支持GPT4.0
This plugin enables caching for the WordPress REST API to improve performance.
此插件可为WordPress REST API进行缓存以提高性能。
Once enabled you can modify the basic settings via the Customizer.
启用后,您可以通过定制程序修改基本设置。 p>
ul>
Several Headers are added to all the API Requests.
几个标头被添加到所有API请求中。
This plugin will also modify the Cache-Control header as well.
该插件还将修改Cache-Control标头。
Here is an example of the available custom headers.
这是可用的自定义标头的示例。 p>
X-API-CACHE-PRO: Cached X-API-CACHE-PRO:已缓存X-API-CACHE-PRO-EXPIRES: January 20, 2019, 12:39 AM UTCX-API-CACHE-PRO-EXPIRES:UTC一月20,2019,12:39X-API-CACHE-PRO-EXPIRES-DIFF: 5 minsX-API-CACHE-PRO-EXPIRES-DIFF:5分钟X-API-CACHE-PRO-KEY: api_cache_pro_78be25416f69cd3a885dcf14017a0691X-API-CACHE-PRO-KEY:api_cache_pro_78be25416f69cd3a885dcf14017a0691 pre>
X-API-CACHE-PRO:已缓存X-API-CACHE-PRO-EXPIRES: January 20, 2019, 12:39 AM UTCX-API-CACHE-PRO-EXPIRES:UTC一月20,2019,12:39X-API-CACHE-PRO-EXPIRES-DIFF: 5 minsX-API-CACHE-PRO-EXPIRES-DIFF:5分钟X-API-CACHE-PRO-KEY: api_cache_pro_78be25416f69cd3a885dcf14017a0691
X-API-CACHE-PRO-EXPIRES: January 20, 2019, 12:39 AM UTC
X-API-CACHE-PRO-EXPIRES:UTC一月20,2019,12:39
X-API-CACHE-PRO-EXPIRES-DIFF: 5 mins
X-API-CACHE-PRO-EXPIRES-DIFF:5分钟
X-API-CACHE-PRO-KEY: api_cache_pro_78be25416f69cd3a885dcf14017a0691
X-API-CACHE-PRO-KEY:api_cache_pro_78be25416f69cd3a885dcf14017a0691 pre>
This plugin offers several filters so you can disable these headers:
此插件提供了几个过滤器,因此您可以禁用以下标头: p>
Filter
过滤器
Type
类型
Default
默认 p>
api_cache_pro_header
api_cache_pro_header code> boolean 布尔 true是 p> api_cache_pro_key_header api_cache_pro_key_header code> boolean 布尔 true是 p> api_cache_pro_expires_header api_cache_pro_expires_header code> boolean 布尔 true是 p> api_cache_pro_expires_diff_header api_cache_pro_expires_diff_header code> boolean 布尔 true是 p> api_cache_pro_control_header api_cache_pro_control_header code> boolean 布尔 true是 p> api_cache_pro_max_age api_cache_pro_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p> api_cache_pro_s_max_age api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
boolean
布尔
true
是 p>
api_cache_pro_key_header
api_cache_pro_key_header code> boolean 布尔 true是 p> api_cache_pro_expires_header api_cache_pro_expires_header code> boolean 布尔 true是 p> api_cache_pro_expires_diff_header api_cache_pro_expires_diff_header code> boolean 布尔 true是 p> api_cache_pro_control_header api_cache_pro_control_header code> boolean 布尔 true是 p> api_cache_pro_max_age api_cache_pro_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p> api_cache_pro_s_max_age api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
api_cache_pro_expires_header
api_cache_pro_expires_header code> boolean 布尔 true是 p> api_cache_pro_expires_diff_header api_cache_pro_expires_diff_header code> boolean 布尔 true是 p> api_cache_pro_control_header api_cache_pro_control_header code> boolean 布尔 true是 p> api_cache_pro_max_age api_cache_pro_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p> api_cache_pro_s_max_age api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
api_cache_pro_expires_diff_header
api_cache_pro_expires_diff_header code> boolean 布尔 true是 p> api_cache_pro_control_header api_cache_pro_control_header code> boolean 布尔 true是 p> api_cache_pro_max_age api_cache_pro_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p> api_cache_pro_s_max_age api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
api_cache_pro_control_header
api_cache_pro_control_header code> boolean 布尔 true是 p> api_cache_pro_max_age api_cache_pro_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p> api_cache_pro_s_max_age api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
api_cache_pro_max_age
api_cache_pro_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p> api_cache_pro_s_max_age api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
integer
整数
Default Timeout or 300 (5 Minutes)
默认超时或300(5分钟) p>
api_cache_pro_s_max_age
api_cache_pro_s_max_age code> integer 整数 Default Timeout or 300 (5 Minutes)默认超时或300(5分钟) p>You can use these filters to disable any of the headers.您可以使用这些过滤器禁用任何标题。Here is an example to disable the Key Header.这是一个禁用密钥头的示例。 p>/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>Disable the Cache禁用缓存 li>Update the Default Cache Timeout Length更新默认缓存超时长度 li>Update any post, page or custom post type.更新任何帖子,页面或自定义帖子类型。 li>Deactivate or Uninstall the plugin停用或卸载插件 li> ul>You can skip that cache by adding the following param to any request:您可以通过将以下参数添加到任何请求中来跳过该缓存: p>`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
You can use these filters to disable any of the headers.
您可以使用这些过滤器禁用任何标题。
Here is an example to disable the Key Header.
这是一个禁用密钥头的示例。 p>
/** / ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header'); pre>Clearing Cache清除缓存 h3>The cache will automatically get cleared if you do any of the following:如果您执行以下任一操作,缓存将自动清除: p>
/ ** * Disable API Cache Pro Key Header. *禁用API缓存专业版密钥标题。 * * * @access public * @公开访问 */* /function disable_api_cache_pro_key_header() { 函数disable_api_cache_pro_key_header(){ return false;返回false;}}add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header');
* Disable API Cache Pro Key Header.
*禁用API缓存专业版密钥标题。
*
* @access public
* @公开访问
*/
* /
function disable_api_cache_pro_key_header() {
函数disable_api_cache_pro_key_header(){
return false;
返回false;
}
add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );
add_action('api_cache_pro_key_header','disable_api_cache_pro_key_header');
pre>
The cache will automatically get cleared if you do any of the following:
如果您执行以下任一操作,缓存将自动清除: p>
You can skip that cache by adding the following param to any request:
您可以通过将以下参数添加到任何请求中来跳过该缓存: p>
`cache=disabledWP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
WP-CLI Support `cache = disabled WP-CLI支持 h3> code> pre>API Cache Pro offers wp-cli support to clear cache with the following command: API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
`cache = disabled WP-CLI支持 h3>
WP-CLI支持 h3>
code> pre>
API Cache Pro offers wp-cli support to clear cache with the following command:
API Cache Pro em>提供wp-cli支持,可使用以下命令清除缓存: p>wp api-cache-pro delete wp api-cache-pro删除 `` p>
wp api-cache-pro delete
wp api-cache-pro删除
`
` p>
api-cache-pro
wp-content/plugins
api-cache-pro code>文件夹复制到您的 wp-content / plugins code>文件夹 li>Activate the API Cache Pro plugin via the plugin admin page通过插件管理页面激活 API Cache Pro code>插件 li>
wp-content / plugins code>文件夹 li>Activate the API Cache Pro plugin via the plugin admin page通过插件管理页面激活 API Cache Pro code>插件 li>
API Cache Pro
API Cache Pro code>插件 li>
ol>
原文出处:http://www.sanshu.cn/a/2562.html
群主管理都是支付大佬