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