In reply to Travis.

Are X-WP-Total, X-WP-TotalPages etc. headers taken care of?

Nope. Not yet. The request doesn’t use a traditional REST call, it creates a different endpoint that fetches data that is otherwise not easy to obtain in the context of REST. Check out This directory.

Are data of several subsequent necessary REST API calls combined in session storage?

Yep. Session storage stores the data from the REST calls in session storage, and then the entire system actually loads the data from session storage instead of the API call. The app itself determines what local URLs need to be cached, and only requests the URLs it does not already have.

How is expiry of data handled, e.g. if new content is available but not yet in session storage?

I’m so glad you asked this question!

A piece of session storage data is set for the last time the cache was cleared, and there is a piece of middleware that will validate the cache every 5 minutes. If the date of the cleared cache does not match, all of the session storage data is wiped.

The cache is cleared every time a post type is updated, or if you manually clear the cache in the settings.