• Resolved mediaatwork

    (@mediaatwork)


    we are working with litespeed enterprise and ESI to optimize our caching. 
    
    The caching it self is now working:
    
    // emit the cache esi tag
    $param['id'] = 12345;
    echo apply_filters(
                'litespeed_esi_url',
                'priceblock',
                'price',
                $param,
                'private,no-vary',
                false,
                true,
                true,
                $param );
    
    // process the esi tag 
    add_action( 'litespeed_esi_load-priceblock', 'esi_priceblock' );
    function esi_priceblock($att) {
        // here is the problem
        do_action( 'litespeed_tag_private_esi', 'tag_price' );
        do_action( 'litespeed_tag_add', 'tagprice2' );
        
        do_action( 'litespeed_control_set_ttl', 600 );
    
        echo "Some Data to be cached " . date("r");
    }
    
    The implementation above is working as is should, now I would like to expired the block.
    So what we tried was (where actually nothing worked):
    
    1) purge
    do_action( 'litespeed_purge', 'tag_price' );
    do_action( 'litespeed_purge', 'tagprice2' );  
    do_action( 'litespeed_purge', 'priceblock' );
    
    2) using litespeed_purge_esi
    3) using litespeed_purge_private_esi
    4) litespeed_purge_widget
    
    all of these which the different names (tag_price, tagprice2, priceblock)
    
    Then we added also: 
    do_action( 'litespeed_purge_finalize');
    But also this did not change anything.
    
    So howto expire the block, by using one of the above names ? Or maybe the data has to be marked in somewhat another way / function ?
    
    best
    
    CHA
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please try enable the debug log , and see what log says

    best regards,

    Thread Starter mediaatwork

    (@mediaatwork)

    Thx for your reply. I checked the log already but I think we could manage to solve the point for outself. The magic seems to come from the control parameter. So once we set this to ‘public,no-vary’ instead of ‘private,no-vary’ we can use litespeed_purge. No idea where the relation here is, but now we have a working model.

    best

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ESI created block is not purged’ is closed to new replies.