Fetch Node
This section assumes you've already set up a unified Node model as described in Modeling Node — the fetch pattern below relies on being able to check whether NodeFields is already populated.
Cache pattern
To avoid fetching the entire node every time it is opened:
- Check if
NodeFieldsis already present (not null) in your local model. - If it is missing, trigger a fetch for the
NodeDetailView. - If it is already present, safely reuse your cached data.
Concrete example
- Node tree — fetch light
NodeViewobjects. You don't need the heavyNodeFieldsto build a tree. - Opening a node — if
NodeFieldsis absent, fetch theNodeDetailView; otherwise, display from cache.