REST API JS Client should cache schema in sessionStorage by default when available
|Reported by:||adamsilverstein||Owned by:||joehoyle|
The wp-api JS client traverses the schema to build out its models and collections. The schema is generally stable and the client is designed to cached the schema in sessionStorage to avoid repeated requests to retrieve the schema. This behavior can be disabled by developers by setting wpApiSettings.cacheSchema to false; If undefined or true, the schema should be cached.
A bug in the check before storing the schema in sessionStorage means it currently never gets set unless wpApiSettings.cacheSchema is explicitly set to true.