• Resolved Spacetime

    (@spacetime)


    Hello,

    how can I disable caching via PHP for a specific page?

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

    (@qtwrk)

    you can use

    do_action( 'litespeed_control_set_nocache', 'nocache for xxx reason' );

    for example

    add_action( 'template_redirect', 'lscwp_product_no_cache' );

    function lscwp_product_no_cache() {
    if ( is_product() ) {
    do_action( 'litespeed_control_set_nocache', 'no cache for product page ' );
    }
    }

    this will disable cache on product page

    Thread Starter Spacetime

    (@spacetime)

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable caching via PHP for a specific page’ is closed to new replies.