[wp-trac] [WordPress Trac] #38895: REST API JS Client should cache schema in sessionStorage by default when available
WordPress Trac
noreply at wordpress.org
Mon Nov 21 20:55:49 UTC 2016
#38895: REST API JS Client should cache schema in sessionStorage by default when
available
-----------------------------+-----------------------------
Reporter: adamsilverstein | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: javascript |
-----------------------------+-----------------------------
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.
Patch incoming.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38895>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list