Support » Plugin: W3 Total Cache » Programmatically preload page cache

  • Is there a way to programmatically trigger preloading of the page cache? (Speaking of the functionality configured under “Cache preload” in the settings)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • +1

    I use custom function for flush page from cache:

    function my_w3tc_flush_page_by_url() {
      $post_url = get_permalink($post_id);
      if ( function_exists('w3tc_flush_url') ) {
        w3tc_flush_url( $post_url );

    Is there a way to do the reverse action? That is to programmatically create a cache of a page by its URL?

    thanks @mamunur34 ! but it only seems to prime the cache for the given post ID. Was more looking for a way to trigger the functionality defined in the W3TC settings including pages in the sitemaps etc… .

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Programmatically preload page cache’ is closed to new replies.