{"id":11303168,"date":"2019-03-12T12:42:46","date_gmt":"2019-03-12T12:42:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/refresh-cache-for-single-page\/"},"modified":"2019-03-12T12:43:36","modified_gmt":"2019-03-12T12:43:36","slug":"refresh-cache-for-single-page","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/refresh-cache-for-single-page\/","title":{"rendered":"Refresh cache for single page"},"content":{"rendered":"<p>Is there any way for a PHP script in my theme to force a single page to be refreshed in the cache?<\/p>\n<p>We have a page for an events calendar which uses a PHP script to show current and future events in our area. To ensure that events in the past are not displayed we clear the cache for that page every night from a cron job using <\/p>\n<p><code>$GLOBALS[&#039;wp_fastest_cache&#039;]-&gt;singleDeleteCache(false,$post_id)<\/code><\/p>\n<p>This works OK but performance issues on our server can result in the first request for this page each day being very slow so I&#8217;d like to be able to arrange for our cron job to force the page to be cached immediately after clearing it.<\/p>\n","protected":false},"template":"","class_list":["post-11303168","topic","type-topic","status-publish","hentry","topic-tag-cache","topic-tag-php"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11303168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11303168\/revisions"}],"predecessor-version":[{"id":11303169,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11303168\/revisions\/11303169"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11303168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}