• Resolved Guido

    (@guido07111975)


    Hi,

    I want to exclude my contact form from caching and I’ve read in this article I can simply add esi + ttl="0" to the shortcode, if plugin does support it.

    If I understand correctly I can make the plugin support this, by adding this to the main plugin file:

    method_exists( 'LiteSpeed_Cache_API', 'purge' ) && LiteSpeed_Cache_API::purge( 'esi.my-shortcode' ) ;

    Is this correct or should I do more, regarding the plugin?

    Guido

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support litetim

    (@litetim)

    @guido07111975
    ESI is available only on LSC Enterprise version
    Do you add the form using a shortcode?

    Thread Starter Guido

    (@guido07111975)

    Do you add the form using a shortcode?

    Yes, I do.

    Plugin Support litetim

    (@litetim)

    @guido07111975
    Try this:
    If shortcode is [form id="xx"] change it to [esi form id="xx"]

    Thread Starter Guido

    (@guido07111975)

    And add this to the main plugin file, I guess?

    method_exists( 'LiteSpeed_Cache_API', 'purge' ) && LiteSpeed_Cache_API::purge( 'esi.my-shortcode' ) ;
    Plugin Support litetim

    (@litetim)

    @guido07111975
    Try without that
    Also the function do not exist in LSC

    Just make sure ESI is turned ON on server side

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Using ESI in shortcode’ is closed to new replies.