• Resolved samben28

    (@samben28)


    Hello

    I’m using ACF option page to modifiy some parts of the website but when I update the option page the old cache is still served and litespeed doesn’t purge the webite automatically.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please go to Cache -> Purge -> Purge all hook , add ACF action into the list , this should trigger the auto purge

    Thread Starter samben28

    (@samben28)

    How exactly can i do that? by adding this “acf/save_post”?

    Plugin Support qtwrk

    (@qtwrk)

    add_action('acf/save_post', 'my_acf_save_post');
    function my_acf_save_post( $post_id ) {
      if (defined('LSCWP')){
        do_action( 'litespeed_purge_post', $post_id );
        //for purge by post id  or , 
        //do_action( 'litespeed_purge_all' );
        //to purge all 
        // more info: https://docs.litespeedtech.com/lscache/lscwp/api/#purge-a-single-post-by-id
      }
    }

    you can try that , if it didn’t work , you can try this code snippet as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ACF Option page update not purging cache’ is closed to new replies.