• Resolved conorseed

    (@conorseed)


    Hey team, I trust you’re having a great day!

    I’ve seen your ESI examples here but can’t quite wrap my head around how to do it

    It grabs a value from the database using get_option() and spits it out as a json variable to be used client side. If the value is more than an hour old, it updates the value through a series of API requests and update_option(). The shortcode also takes attributes in order for the output to be filtered on client side.

    Basically, it’s the “Upcoming Courses” section on the home page, and a number of other pages, but it will display differently depending on the shortcode attributes.

    Any advice? Would it be helpful to view the code? Thanks for your time.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter conorseed

    (@conorseed)

    Brilliant response – thank you @lclarke. That helps me immensely.

    I think I know what I’m doing now. Thanks to both of you for being patient with me and answering my (probably very noob) questions!

    One last one for you: I’m probably missing something but is there a way I can set a TTL for the ESI block? Or do I have to manage that in the general settings somewhere?

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    No problem at all. It’s a complicated topic at first!

    As for TTL? It turns out the answer is not in our wiki! That’s our mistake, sorry about that. This function: LiteSpeed_Cache_API::set_ttl( $val ) ($val is the TTL in seconds, i.e. 3600)

    I hope this helps. We’ll document that function in our wiki today ??

    Thread Starter conorseed

    (@conorseed)

    There we go! And we have a winner ?? Officially resolved now!

    Thanks again for all the help.

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    So glad to hear it!

    Happy Caching ??

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘ESI API Help <3’ is closed to new replies.