Table of Contents

Method MemoizedWithKey

Namespace
Velvet
Assembly
Velvet.Docs.dll

MemoizedWithKey(string?, Func<VNode>, params object?[]?)

Keyed memoization node. Provides a stable cache keyed by the supplied key.

public static MemoNode MemoizedWithKey(string? key, Func<VNode> factory, params object?[]? deps)

Parameters

key string

Stable cache key independent of sibling order.

factory Func<VNode>

Factory invoked to produce the cached VNode when deps change.

deps object[]

Dependency values used to detect changes, with the same empty-array and null meanings as Memoized(Func<VNode>, params object?[]?).

Returns

MemoNode

The created MemoNode.

MemoizedWithKey(string?, Func<VNode>)

Keyed variant of Memoized(Func<VNode>): declares no dependency array, under an explicit cache key.

public static MemoNode MemoizedWithKey(string? key, Func<VNode> factory)

Parameters

key string

Stable cache key independent of sibling order.

factory Func<VNode>

Factory invoked on every reconcile to produce the subtree.

Returns

MemoNode

The created MemoNode.