Click or drag to resize
Ab4d.SharpEngine logo

SceneCacheObject Method

CacheObject sets the specified objectToCache to the specified key in the cache. The value can be retrieved by GetCachedObjectT(String) or removed by RemoveCachedObject(String) method. When a Mesh object is cached, this will set IsSceneCached to true and prevent disposing the mesh (by calling Dispose method) before the Scene is disposed or before the mesh is removed from the cache. Mesh and GpuImage objects can be cached only in one Scene object. This method is thread safe and can be called from any thread.

Namespace: Ab4d.SharpEngine
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public void CacheObject(
	string key,
	Object? objectToCache
)

Parameters

key  String
key as sting
objectToCache  Object
object to store the specified key; when null the key is removed from the cache

Implements

ICacheProviderCacheObject(String, Object)
See Also