Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32177
    Gregorio
    Guest

    Is there any documentation?

    #32195
    Jesse Owens
    Keymaster

    Hi Gregorio-

    The REST API Cache works in very much the same way as the Page Cache, in that once a REST request has been served, the response is stored in the Page Cache storage so that it can be served again without processing the request via PHP and Database queries.

    We’re still working on the documentation for this feature, but if you have any issues or specific questions we’re happy to help in the meantime.

    #32196
    Gregorio
    Guest

    How do you manage requests with credentials (authenticated users) and instead public ones?

    I use JWT authentication. Is it compatible?

    Does it work with the _embed topic?

    Does it save portions of requests (e.g. parts of posts)?

    How does the _embed endpoint handle?

    #32228
    Marko Vasiljevic
    Keymaster

    Hello Gregorio,

    Thank you for your inquiry.
    There is no known incompatibility with JWT authentication and since the Page Cache should always be disabled for logged in users REST API caching will not be performed in this case.
    The _embed parameter indicates to the server that the response should include these embedded resources.
    So for example, /wp/v2/posts?_embed=author,wp:term will only embed the post’s author and the lists of terms associated with the post and it will be cached if REST API cache is enabled.
    For more details on what is actually cached, you can use Statistic in Performance>Statistic and Under the PHP requests section, you should see the Cache Fill option which you can then open to see /wp-json.
    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How does the rest API cache work?’ is closed to new replies.