Version 3.3.1.2

PersistentContextCache class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public class PersistentContextCache
Persistent Context cache object.
Inheritance
  • System.Object
  • PersistentContextCache

Properties

CacheSize
Estimated cache size in bytes.
public int CacheSize { get; }
EnableCaching
If true then persistent context is disabled entirely.
[ShowInInspector]
public bool EnableCaching { get; set; }
EntryCount
The current number of context entries in the cache.
public int EntryCount { get; }
Instance
public static PersistentContextCache Instance { get; }
MaxCacheByteSize
The max size of the cache in bytes.
[ShowInInspector]
[EnableIf("EnableCaching")]
[CustomValueDrawer("DrawCacheSize")]
[SuffixLabel("KB", false, Overlay = true)]
public int MaxCacheByteSize { get; }
WriteToFile
If true the context will be saved to a file in the temp directory.
[ShowInInspector]
[EnableIf("EnableCaching")]
public bool WriteToFile { get; set; }

Methods

DeleteCache()
Delete the persistent cache file.
[Button(ButtonSizes.Medium)]
[ButtonGroup("_DefaultGroup", 0F)]
[EnableIf("EnableCaching")]
public void DeleteCache()