• Hi, I built a quick plugin that adds a like button on the posts comments. As you can see on the link sent, the like count is not being updated after the button is clicked and the page refreshed.

    I am using get_comment_meta to retrieve the like count to be updated on the page.

    Let me know if there is anyway I can exclude this from being cached.
    Thanks

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

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

    (@qtwrk)

    unfortunately that’s not possible, once page is cached, it’s cached

    you have 3 options

    first one is less optimal , call the purge action upon your “like” button click

    second choice is to use ESI block , you can check this plugin as sample : https://github.com/qtwrk/lscwp-esi-pv , it’s made for post view count , but you can see the logic and method as how to use ESI

    third option is to use ajax call to update your count when page loads

Viewing 1 replies (of 1 total)

The topic ‘Exclude get_comment_meta from being cached’ is closed to new replies.