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 |
BinaryStorage utilizes MemoryPack, which means the object must be MemoryPackSerializable https://github.com/Cysharp/MemoryPack
- interface IPublicAPI
- namespace Flow.Launcher.Plugin