• Resolved georgepennet

    (@georgepennet)


    Hi.

    I know we already discussed this matter but I still have some issues.

    Please take a look at this code

    add_filter( 'swcfpc_post_related_url_init', function( $listofurls ) {
    
      $listofurls = [
        site_url( '/investice/zpravy/' ),
    		site_url( '/games/fpp/' ),
    		site_url( '/investice/rpg/' ),
                    site_url( '/reviews' )
      ];
    
      return $listofurls;
    }, 10, 1 );

    What I want is no matter what – if post is published normally or scheduled it should clear cache in all of these pages. I noticed that sometimes it works…sometimes it doesn’t. Don’t know why. For example in reviews – It wasn’t working properly.

    Maybe I should also change something in the settings?

    I know that in settings we have 2 options

    Purge cache for related pages only – (recommended)
    Purge whole cache

    Im using the recommended one. I wish there was a third option like purge whole cache (except posts). That would be perfect..Maybe some kind of code for this?

    Because in my case it’s impossible to monitor this stuff manually.

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

    (@isaumya)

    For example in reviews – It wasn’t working properly.

    – Cause you added site_url( '/reviews' ) without the trailing slash which makes it a 301 redirect. It shhould be site_url( '/reviews/' ).

    Im using the recommended one. I wish there was a third option like purge whole cache (except posts). That would be perfect..Maybe some kind of code for this?

    – Sorry, that would not be a possible cause as easy as it is sound in your head it is not.

Viewing 1 replies (of 1 total)

The topic ‘Clear pages after publishing post’ is closed to new replies.