• Resolved holafreak

    (@holafreak)


    The plugin works fine so far and my site feels much faster. Now I did some testing and if I insert a new post it will not be displayed until I purge the cache manually.

    Is there an option for that that I didn’t see?

Viewing 1 replies (of 1 total)
  • Plugin Support Kush

    (@kushnamdev)

    Hi @holafreak,

    Thank you for contacting us.

    You can use the swcfpc_post_related_url_init filter to add extra URLs that will be considered under the list of related URLs so when you publish or update any post, it will also purge those URLs.

    For example you can add the following code in your functions.php file:

    add_filter( 'swcfpc_post_related_url_init', function($listofurls) {
    	return array_merge(
    		$listofurls,
    		[
    			'https://example.com/page/2/',
    			'https://example.com/page/3/',
    			'https://example.com/page/4/',
    			'https://example.com/page/5/',
    			'https://example.com/page/6/',
    			'https://example.com/page/7/',
    			'https://example.com/page/8/',
    			'https://example.com/page/9/',
    			'https://example.com/page/10/'
    		]
    	);
    } );

    Make sure you replace the URLs with actual URLs.
    Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Automatic cache purge on new post’ is closed to new replies.