• WP Rest Cache nicely caches JSON requests like this:

    /wp-json/wp/v2/post_type?_embed=&page=1&per_page=80

    However, when I update a post of the post_type above, this cache is not flushed.
    That is not ideal.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Richard Korthuis

    (@rockfire)

    Hi @mastababa

    Thank you for using our plugin!

    I tested your issue using the endpoint for posts (/wp-json/wp/v2/posts?_embed=&page=1&per_page=80) and did some requests to multiple pages. They were all cached nicely. I then edited one of the posts and the caches were flushed as expected. So I am unable to reproduce your issue.

    Did you use filters to alter the output of the endpoint (i.e. did you strip out the id or type field)? If you visit the Settings > WP REST Cache > Endpoint API Caches tab, do you see the correct post type in the column Object Type for the specific endpoints?

    Thread Starter Babak Fakhamzadeh

    (@mastababa)

    Thanks Richard.

    This is for a custom post type, so there’s that.

    No, I do not strip out data from the endpoints. I do *add* data to the endpoints.

    No, the correct post type is not showing in the list of caches. It says ‘unknown’.

    Thread Starter Babak Fakhamzadeh

    (@mastababa)

    Any update on this?

    I’m now encountering this same problem on another website. There, too, the post type is custom, and the ‘object type’ in the table of caches is listed as ‘unknown’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.