Materializing and Caching Views
All view functions hold zero updates of their own, simply providing a lens through which to look at a graph. This is by design so that you can have many views without expensive data duplication.
Materialize
If the original graph is updated, all views of it will also update. If you do not want this, you can call materialize() on a view to create a new graph and copy all the updates the view contains into it.
In the example below, we create a windowed view of the baboon interaction data for a single day, then materialize it. After adding a new interaction to the materialized graph, the original view is unchanged.
Caching a view
For large graphs, checking whether each node and edge belongs to a view (matching time windows, layers, filters) on every operation adds up. If you're going to run an iterative algorithm like PageRank, or perform multiple operations on the same view, you can use cache_view() to pre-compute which nodes and edges are included.
Unlike materialize(), cache_view() does not copy any data. It builds an index of the graph structure with the view applied, so subsequent operations don't need to re-check view conditions.