Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 974 Bytes

LoadCacheBinaryStorageAsync.md

File metadata and controls

27 lines (19 loc) · 974 Bytes

IPublicAPI.LoadCacheBinaryStorageAsync<T> method

Load BinaryStorage for current plugin's cache. This is the method used to load cache from binary in Flow. When the file is not exist, it will create a new instance for the specific type.

public Task<T> LoadCacheBinaryStorageAsync<T>(string cacheName, string cacheDirectory, 
    T defaultData)
    where T : new()
parameter description
T Type for deserialization
cacheName Cache file name
cacheDirectory Cache directory from plugin metadata
defaultData Default data to return

Remarks

BinaryStorage utilizes MemoryPack, which means the object must be MemoryPackSerializable https://github.com/Cysharp/MemoryPack

See Also