• Resolved carlosantoro96

    (@carlosantoro96)


    Hi, I’m using the “REST API Cache” feature. I’m using Postman for testing. When I update a Post, I keep receiving the old cached value, so I think response is not being purged.
    I have Page Cache enabled with Page Cache Method:Basic.
    My website works as expected and on Post update the new page correctly reload, so I have problem just with Rest Api response.
    What could be wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carlosantoro96

    Thank you for reaching out and I am happy to assist you with this.
    Can you please try to add the page to Performance>Page Cache>Purge Policy>Additional pages: and specify additional pages to purge. Including the parent page in the path. Ex: parent/posts or try /some-page/

    Let me know if this helps!

    Thanks!

    Thread Starter carlosantoro96

    (@carlosantoro96)

    Hello Marko, thanks for answeing. Which page should I add in Additional Pages? I’m not having any problem with pages of website (they are correctly purged on update), but only with response of rest API (returning the old json even after update). Do you mean i should add the url related to the Rest API itself? like
    http://www.mysite.org/wp-json/wp/v2/posts ?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carlosantoro96

    Thank you for your feedback.
    I’ve checked this more and the “rest” group is added for flushing if rest caching is enabled. So if REST API caching is enabled, it’s always purged.
    What you can do is to check-in the page cache log when debugging is enabled in W3TC, that entry added
    flush_group rest
    I hope this helps!

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

The topic ‘Rest API Cache not purged on Post update’ is closed to new replies.