• Resolved salmancrusher

    (@salmancrusher)


    Hi, I tried creating an ESI block but that put the cache in private by default

    I want to create a simple function, that i will render custom post list, I want to save this block in “Public Cache for 5 mins”

    In the docs and developer hooks, It only allows to set no_cache and ttl.

    What hook can I use to set it to public?

    here is my code

    echo apply_filters( ‘litespeed_esi_url’, ‘display_most_read’, ‘Most Read ESI block’ );

    Functions.php

    add_action( ‘litespeed_esi_load-display_most_read’, ‘most_read_block_content’ );
    function most_read_block_content() {


    //return processed content
    }

    Much appreciated

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

    (@qtwrk)

    in your most_read_block_content function , you can add

    do_action( 'litespeed_control_force_public', 'a custom note to shown in debug log' );
    do_action( 'litespeed_control_set_ttl', '300' );
Viewing 1 replies (of 1 total)
  • The topic ‘Help creating an ESI Block’ is closed to new replies.