Search Results for

    Show / Hide Table of Contents

    Class ComponentCache<TKey, TValue>

    A specialized LRUCache for caching components.

    Inheritance
    object
    ComponentCache<TKey, TValue>
    Namespace: Global
    Assembly: Dew.Core.dll
    Syntax
    public class ComponentCache<TKey, TValue> where TKey : Object where TValue : class
    Type Parameters
    Name Description
    TKey

    The key, typically a Collider or GameObject.

    TValue

    The component type to cache.

    Constructors

    ComponentCache(int)

    Declaration
    public ComponentCache(int capacity)
    Parameters
    Type Name Description
    int capacity

    Methods

    Clear()

    Declaration
    public void Clear()

    GetOrAdd(TKey, Func<TValue>)

    Declaration
    public TValue GetOrAdd(TKey key, Func<TValue> valueFactory)
    Parameters
    Type Name Description
    TKey key
    System.Func<TResult><TValue> valueFactory
    Returns
    Type Description
    TValue
    In This Article
    Back to top Shape of Dreams API Documentation