{"id":109714,"date":"2019-09-30T17:52:38","date_gmt":"2019-09-30T17:52:38","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/api-cache-pro\/"},"modified":"2022-04-18T22:21:50","modified_gmt":"2022-04-18T22:21:50","slug":"api-cache-pro","status":"publish","type":"plugin","link":"https:\/\/zul.wordpress.org\/plugins\/api-cache-pro\/","author":17967069,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.0.4","stable_tag":"trunk","tested":"5.2.24","requires":"5.0","requires_php":"7.0","requires_plugins":"","header_name":"API Cache Pro","header_author":"Hubbard Labs","header_description":"A simple plugin to cache WP Rest API Requests.","assets_banners_color":"","last_updated":"2022-04-18 22:21:50","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/hubbardlabs.com","header_plugin_uri":"https:\/\/github.com\/hubbardlabs\/api-cache-pro","header_author_uri":"https:\/\/github.com\/hubbardlabs\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1438,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.0.7":{"tag":"0.0.7","author":"bhubbard","date":"2021-07-14 02:46:00"}},"upgrade_notice":{"":"<p>First Release<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.0.7"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1556,176805,146],"plugin_category":[52],"plugin_contributors":[80608,192894],"plugin_business_model":[],"class_list":["post-109714","plugin","type-plugin","status-publish","hentry","plugin_tags-api","plugin_tags-api-cache-pro","plugin_tags-cache","plugin_category-performance","plugin_contributors-bhubbard","plugin_contributors-hubbardlabs","plugin_committers-bhubbard","plugin_committers-hubbardlabs"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/api-cache-pro.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin enables caching for the WordPress REST API to improve performance. Once enabled you can modify the basic settings via the Customizer.<\/p>\n\n<h4>Customizer Options:<\/h4>\n\n<ul>\n<li>Disable Cache (Default: Disabled)<\/li>\n<li>Set Default Cache Timeout (Default: 300)<\/li>\n<\/ul>\n\n<h3>Request Headers<\/h3>\n\n<p>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.<\/p>\n\n<pre>X-API-CACHE-PRO: Cached\nX-API-CACHE-PRO-EXPIRES: January 20, 2019, 12:39 AM UTC\nX-API-CACHE-PRO-EXPIRES-DIFF: 5 mins\nX-API-CACHE-PRO-KEY: api_cache_pro_78be25416f69cd3a885dcf14017a0691<\/pre>\n\n<ul>\n<li><strong>X-API-CACHE-PRO<\/strong> - Displays Cached, or Not Cached.<\/li>\n<li><strong>X-API-CACHE-PRO-EXPIRES<\/strong> - Displays the date\/time the cache is set to expire.<\/li>\n<li><strong>X-API-CACHE-PRO-EXPIRES-DIFF<\/strong> - Displays the difference from current time to the time cache is set to expire.<\/li>\n<li><strong>X-API-CACHE-PRO-KEY<\/strong> - Displays the key used for the cache.<\/li>\n<\/ul>\n\n<p>This plugin offers several filters so you can disable these headers:<\/p>\n\n\n\n\n  Filter\n  Type\n  Default\n\n\n\n\n  <code>api_cache_pro_header<\/code>\n  boolean\n  true\n\n\n  <code>api_cache_pro_key_header<\/code>\n  boolean\n  true\n\n\n  <code>api_cache_pro_expires_header<\/code>\n  boolean\n  true\n\n\n  <code>api_cache_pro_expires_diff_header<\/code>\n  boolean\n  true\n\n\n  <code>api_cache_pro_control_header<\/code>\n  boolean\n  true\n\n\n  <code>api_cache_pro_max_age<\/code>\n  integer\n  Default Timeout or 300 (5 Minutes)\n\n\n  <code>api_cache_pro_s_max_age<\/code>\n  integer\n  Default Timeout or 300 (5 Minutes)\n\n\n\n\n<p>You can use these filters to disable any of the headers. Here is an example to disable the Key Header.<\/p>\n\n<pre>\/**\n * Disable API Cache Pro Key Header.\n *\n * @access public\n *\/\nfunction disable_api_cache_pro_key_header() {\n    return false;\n}\nadd_action( 'api_cache_pro_key_header', 'disable_api_cache_pro_key_header' );\n<\/pre>\n\n<h3>Clearing Cache<\/h3>\n\n<p>The cache will automatically get cleared if you do any of the following:<\/p>\n\n<ul>\n<li>Disable the Cache<\/li>\n<li>Update the Default Cache Timeout Length<\/li>\n<li>Update any post, page or custom post type.<\/li>\n<li>Deactivate or Uninstall the plugin<\/li>\n<\/ul>\n\n<p>You can skip that cache by adding the following param to any request:<\/p>\n\n<pre><code>`cache=disabled&lt;pre&gt;&lt;h3&gt;WP-CLI Support&lt;\/h3&gt;\n<\/code><\/pre>\n\n<p><em>API Cache Pro<\/em> offers wp-cli support to clear cache with the following command:\n\nwp api-cache-pro delete\n    `<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Copy the <code>api-cache-pro<\/code> folder into your <code>wp-content\/plugins<\/code> folder<\/li>\n<li>Activate the <code>API Cache Pro<\/code> plugin via the plugin admin page<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>FAQ Coming Soon!<\/p>\n\n<!--section=changelog-->\n<p>Please see <a href=\"CHANGELOG.md\">CHANGELOG.MD<\/a><\/p>","raw_excerpt":"This plugin enables caching for the WordPress REST API to improve performance. Once enabled you can modify the basic settings via the Customizer.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/109714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=109714"}],"author":[{"embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/hubbardlabs"}],"wp:attachment":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=109714"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=109714"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=109714"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=109714"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=109714"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=109714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}