# Sandbox.Animation.GraphBuilder.Cached

```csharp
Node Cached(Node source, bool cacheOnInit = True)
```

Latch a value from `source` - by default once when this node
starts (cache-on-init), otherwise once when its branch deactivates (cache-on-exit).
Works with bool, float, ID, vector and target values.

### Parameters

- `source` (`Node`)
- `cacheOnInit` (`bool`), default `True`

### Returns

`Node`

Declared in [Sandbox.Animation.GraphBuilder](/api/Sandbox.Animation.GraphBuilder).
Assembly: `Sandbox.Engine`.
