Title: API Cache Pro
Author: Hubbard Labs
Published: <strong>30 Setembro, 2019</strong>
Last modified: 18 Abril, 2022

---

Procurar plugins

Este plugin **não foi testado com as 3 últimas grandes versões do WordPress**. Pode
já não ser suportado e pode ter problemas de compatibilidade quando usado com versões
mais recentes do WordPress.

![](https://s.w.org/plugins/geopattern-icon/api-cache-pro.svg)

# API Cache Pro

 Por [Hubbard Labs](https://profiles.wordpress.org/hubbardlabs/)

[Descarregar](https://downloads.wordpress.org/plugin/api-cache-pro.zip)

 * [Detalhes](https://pt.wordpress.org/plugins/api-cache-pro/#description)
 * [Avaliações](https://pt.wordpress.org/plugins/api-cache-pro/#reviews)
 *  [Instalação](https://pt.wordpress.org/plugins/api-cache-pro/#installation)
 * [Desenvolvimento](https://pt.wordpress.org/plugins/api-cache-pro/#developers)

 [Suporte](https://wordpress.org/support/plugin/api-cache-pro/)

## Descrição

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
 `

## Instalação

 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

## Perguntas frequentes

FAQ Coming Soon!

## Avaliações

Este plugin não tem avaliações.

## Contribuidores e programadores

“API Cache Pro” é software de código aberto. As seguintes pessoas contribuíram para
este plugin:

Contribuidores

 *   [ Hubbard Labs ](https://profiles.wordpress.org/hubbardlabs/)
 *   [ Brandon Hubbard ](https://profiles.wordpress.org/bhubbard/)

[Traduza o “API Cache Pro” para o seu idioma.](https://translate.wordpress.org/projects/wp-plugins/api-cache-pro)

### Interessado no desenvolvimento?

[Consulte o código](https://plugins.trac.wordpress.org/browser/api-cache-pro/), 
consulte o [repositório SVN](https://plugins.svn.wordpress.org/api-cache-pro/), 
ou subscreva o [registo de alterações](https://plugins.trac.wordpress.org/log/api-cache-pro/)
por [RSS](https://plugins.trac.wordpress.org/log/api-cache-pro/?limit=100&mode=stop_on_copy&format=rss).

## Registo de alterações

Please see [CHANGELOG.MD](https://pt.wordpress.org/plugins/api-cache-pro/CHANGELOG.md?output_format=md)

## Metadados

 *  Versão **0.0.4**
 *  Última actualização **Há 4 anos**
 *  Instalações activas **Menos de 10**
 *  Versão do WordPress ** 5.0 ou superior **
 *  Testado até **5.2.24**
 *  Versão do PHP ** 7.0 ou superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/api-cache-pro/)
 * Etiquetas
 * [api](https://pt.wordpress.org/plugins/tags/api/)[cache](https://pt.wordpress.org/plugins/tags/cache/)
 *  [Visualização avançada](https://pt.wordpress.org/plugins/api-cache-pro/advanced/)

## Classificações

Ainda não foram submetidas avaliações.

[Your review](https://wordpress.org/support/plugin/api-cache-pro/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/api-cache-pro/reviews/)

## Contribuidores

 *   [ Hubbard Labs ](https://profiles.wordpress.org/hubbardlabs/)
 *   [ Brandon Hubbard ](https://profiles.wordpress.org/bhubbard/)

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/api-cache-pro/)

## Doar

Gostaria de apoiar o desenvolvimento deste plugin?

 [ Fazer donativo para o plugin ](https://hubbardlabs.com)