이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

API Cache Pro

설명

This plugin enables caching for the WordPress REST API to improve performance. Once enabled you can modify the basic settings via the Customizer.

Customizer Options:

  • Disable Cache (Default: Disabled)
  • Set Default Cache Timeout (Default: 300)

Request Headers

Several Headers are added to all the API Requests. This plugin will also modify the Cache-Control header as well. Here is an example of the available custom headers.

X-API-CACHE-PRO: Cached
X-API-CACHE-PRO-EXPIRES: January 20, 2019, 12:39 AM UTC
X-API-CACHE-PRO-EXPIRES-DIFF: 5 mins
X-API-CACHE-PRO-KEY: api_cache_pro_78be25416f69cd3a885dcf14017a0691
  • X-API-CACHE-PRO – Displays Cached, or Not Cached.
  • X-API-CACHE-PRO-EXPIRES – Displays the date/time the cache is set to expire.
  • X-API-CACHE-PRO-EXPIRES-DIFF – Displays the difference from current time to the time cache is set to expire.
  • X-API-CACHE-PRO-KEY – Displays the key used for the cache.

This plugin offers several filters so you can disable these headers:

Filter
Type
Default

api_cache_pro_header
boolean
true

api_cache_pro_key_header
boolean
true

api_cache_pro_expires_header
boolean
true

api_cache_pro_expires_diff_header
boolean
true

api_cache_pro_control_header
boolean
true

api_cache_pro_max_age
integer
Default Timeout or 300 (5 Minutes)

api_cache_pro_s_max_age
integer
Default Timeout or 300 (5 Minutes)

You can use these filters to disable any of the headers. Here is an example to disable the Key Header.

/**
 * Disable API Cache Pro Key Header.
 *
 * @access public
 */
function disable_api_cache_pro_key_header() {
    return false;
}
add_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );

Clearing Cache

The cache will automatically get cleared if you do any of the following:

  • Disable the Cache
  • Update the Default Cache Timeout Length
  • Update any post, page or custom post type.
  • Deactivate or Uninstall the plugin

You can skip that cache by adding the following param to any request:

`cache=disabled<pre><h3>WP-CLI Support</h3>

API Cache Pro offers wp-cli support to clear cache with the following command:

wp api-cache-pro delete
`

설치

  1. Copy the api-cache-pro folder into your wp-content/plugins folder
  2. Activate the API Cache Pro plugin via the plugin admin page

FAQ

FAQ Coming Soon!

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“API Cache Pro”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “API Cache Pro”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

Please see CHANGELOG.MD