• Dear admin,
    I have blog post list in my home page, but every time I update post or add new blog post, the home page could not auto purge cache, how to solve it.

    I noitice there is a option:
    Automatically purge the Cloudflare’s cache when something changes on the website
    (1 purge cache for related pages only – (recommended) I opt in this option
    2 Purge whole cache)

    it seems the home page is not related blog post, so it will not auto purge cache after I add new blog post or update pos, so How can I solve it?

    thanks

Viewing 1 replies (of 1 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    it depends on your site structure and how it has been built but you can try adding the following code in your functions.php to add your home page in the list of related URLs.

    add_filter( 'swcfpc_post_related_url_init', function( $listofurls ) {
    	$listofurls = [
    		'https://example.com/',
    	];
    
    	return $listofurls;
    } );

    Make sure you replace example.com with your actual site address and let me know if that works.

Viewing 1 replies (of 1 total)
  • The topic ‘purge cache home page automatic’ is closed to new replies.