Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.09 KB

SaveCacheBinaryStorageAsync.md

File metadata and controls

25 lines (17 loc) · 1.09 KB

IPublicAPI.SaveCacheBinaryStorageAsync<T> method

Save BinaryStorage for current plugin's cache. This is the method used to save cache to binary in Flow. This method will save the original instance loaded with LoadCacheBinaryStorageAsync. This API call is for manually Save. Flow will automatically save all cache type that has called LoadCacheBinaryStorageAsync or SaveCacheBinaryStorageAsync previously.

public Task SaveCacheBinaryStorageAsync<T>(string cacheName, string cacheDirectory)
    where T : new()
parameter description
T Type for Serialization
cacheName Cache file name
cacheDirectory Cache directory from plugin metadata

Remarks

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

See Also