Class DownloadLicenseCacheStorage
Download license cache storage
Implements
Inherited Members
Namespace: Pixiv.VroidSdk.Cache.DataModel
Assembly: Pixiv.VroidSdk.dll
Syntax
public sealed class DownloadLicenseCacheStorage : ICacheStorage<CachedDownloadLicenseFile>, IKeyValueStorable<string, CachedDownloadLicenseFile>
Remarks
Deleted from oldest used cache
Properties
CachedData
Cached data
Declaration
public IDictionary<string, CachedDownloadLicenseFile> CachedData { get; }
Property Value
Type | Description |
---|---|
IDictionary<String, CachedDownloadLicenseFile> |
Methods
GetObject(String)
Get CachedDownloadLicenseFile from cache
Declaration
public CachedDownloadLicenseFile GetObject(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Key string |
Returns
Type | Description |
---|---|
CachedDownloadLicenseFile | RetrievedCachedDownloadLicenseFile |
Remarks
Returns null
if cache out, nonexistent
Load(String, UInt32)
Instantiate DownloadLicenseCacheStorage from cache data file
Declaration
public static DownloadLicenseCacheStorage Load(string storeFilePath, uint maxCacheCount = 10U)
Parameters
Type | Name | Description |
---|---|---|
String | storeFilePath | Cache data file path |
UInt32 | maxCacheCount | Max cache count (Default 10) |
Returns
Type | Description |
---|---|
DownloadLicenseCacheStorage | Download license cache storage |
RemoveKey(String)
Delete CachedDownloadLicenseFile of specified key
Declaration
public bool RemoveKey(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | Key to be deleted |
Returns
Type | Description |
---|---|
Boolean | Returns |
Save()
Save cache to file system
Declaration
public void Save()