{"id":15938871,"date":"2022-08-22T14:56:22","date_gmt":"2022-08-22T14:56:22","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/clear-cache-and-regenerate\/"},"modified":"2022-08-22T15:04:42","modified_gmt":"2022-08-22T15:04:42","slug":"clear-cache-and-regenerate","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/clear-cache-and-regenerate\/","title":{"rendered":"Clear cache and regenerate"},"content":{"rendered":"<p>Hi,<br \/>\nI made a website getting information from 2 other wordpress websites, the problem is i need to clear cache after 20m of all website. How can i regenerate the page cache? I tried using crawler, but it won&#8217;t work since doesn&#8217;t exist a sitemap. I currently delete all cache using cron after 20m, but i can&#8217;t regenerate the cache after it. I tried to make a curl to page (not working), but when i access the page after 20m, the page takes too long to load (since it is recreating the cache on my access).<br \/>\nAny ideas of how i can regenerate the cache? In my case, regenerate home cache will solve my problem.<\/p>\n<p>My cron script:<\/p>\n<pre><code>&lt;?php\ndefine( &#039;WP_USE_THEMES&#039;, false ); \nrequire( &#039;\/var\/www\/html\/wp-load.php&#039; );\ndo_action( &#039;litespeed_purge_all&#039; );\n  \n\n$ch = curl_init(&#039;https:\/\/mywebsite.com&#039;);\n\ncurl_exec($ch);\ncurl_close($ch);\n\necho &quot;done&quot;;\n\n?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-15938871","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15938871","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\/15938871\/revisions"}],"predecessor-version":[{"id":15938903,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15938871\/revisions\/15938903"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15938871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}