• Resolved luminsol

    (@luminsol)


    Hi guys,

    According to your documentation, purge_post should only clear the post ID supplied.

    LiteSpeed_Cache_API::purge_post($id)
    
    Purges a single post by id.
    

    However, I’m finding it will clear the entire cache. Here’s the purge log. The post ID I’m passing in is 11907, which appears in the log – but I seeing it’s clearing a lot more. Can anyone help make sense of the log?

    08/20/19 14:25:58.936 [IP Removed:52121 1 TbL] ?? ------GET HTTP/1.1 (HTTPS)  /webhook/clear-cache.php
    08/20/19 14:25:58.936 [IP Removed:52121 1 TbL] Query String: 
    08/20/19 14:25:58.936 [IP Removed:52121 1 TbL] X-LiteSpeed-Purge: public,stale,602_Po.11907,602_URL.bf1d939cbc9215ad3275393cf5fbb9c3,602_W.recent-posts-9,602_A.1,602_F,602_H,602_PGS,602_PGSRP,602_D.201805,602_REST => LSC->send_headers()@680 => WP_Hook->apply_filters()@286 => WP_Hook->do_action()@310 => 
    /home/user/public_html/wp/wp-includes/load.php@465
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Perhaps this wiki might help

    Basically , when you purge a post , like when edit it or publish it.

    the page related to it , like category page , home/front page (if it shows in there) , recent widget …etc are probably also purged.

    Also please try uncheck some of these auto-purge

    Best regards,

    Thread Starter luminsol

    (@luminsol)

    Thank you for your response.

    I was unaware that the API functions behaved that way. Unchecking all the auto-purge settings fixed my problem.

    It would be nice if this was documented in the API, or the API had a direct function which doesn’t trigger the auto-purge rules.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    That was the point for purge function , if related page didn’t purge , people might think purge doesn’t work at all.

    Thanks for your advice , we will update our documentation accordingly ??

    Best regards,

    Thread Starter luminsol

    (@luminsol)

    I totally understand the reasons why it has been done that way.

    I wrongly assumed the API was a way to allow finer grain control.

    Thank you for listening! Closing this issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘API – purge_post clears entire cache?’ is closed to new replies.