Table of Contents

Class ObjectCacheUtil

Namespace
Vintagestory.API.Util
Assembly
VintagestoryAPI.dll
public static class ObjectCacheUtil
Inheritance
ObjectCacheUtil
Inherited Members

Methods

Delete(ICoreAPI, string)

public static bool Delete(ICoreAPI api, string key)

Parameters

api ICoreAPI
key string

Returns

bool

GetOrCreate<T>(ICoreAPI, string, CreateCachableObjectDelegate<T>)

public static T GetOrCreate<T>(ICoreAPI api, string key, CreateCachableObjectDelegate<T> onRequireCreate)

Parameters

api ICoreAPI
key string
onRequireCreate CreateCachableObjectDelegate<T>

Returns

T

Type Parameters

T

TryGet<T>(ICoreAPI, string)

public static T TryGet<T>(ICoreAPI api, string key)

Parameters

api ICoreAPI
key string

Returns

T

Type Parameters

T