C# Класс FFImageLoading.Cache.SimpleDiskCache

Наследование: IDiskCache
Показать файл Открыть проект

Открытые методы

Метод Описание
AddToSavingQueueIfNotExistsAsync ( string key, byte bytes, System.TimeSpan duration ) : Task

Adds the file to cache and file saving queue if it does not exists.

ClearAsync ( ) : Task

Clears all cache entries.

CreateCache ( string cacheName, Configuration configuration ) : SimpleDiskCache

Creates new cache default instance.

ExistsAsync ( string key ) : Task

Checks if cache entry exists/

GetFilePathAsync ( string key ) : Task
RemoveAsync ( string key ) : Task

Removes the specified cache entry.

SimpleDiskCache ( string cachePath, Configuration configuration ) : System

Initializes a new instance of the FFImageLoading.Cache.SimpleDiskCache class.

TryGetStreamAsync ( string key ) : Task

Tries to get cached file as stream.

Защищенные методы

Метод Описание
CleanCallback ( ) : Task
CleanCallback ( object state ) : void
GetDuration ( string text ) : System.TimeSpan
Init ( ) : Task
InitializeEntries ( ) : Task
InitializeEntries ( ) : void
WaitForPendingWriteIfExists ( string key ) : Task

Описание методов

AddToSavingQueueIfNotExistsAsync() публичный Метод

Adds the file to cache and file saving queue if it does not exists.
public AddToSavingQueueIfNotExistsAsync ( string key, byte bytes, System.TimeSpan duration ) : Task
key string Key to store/retrieve the file.
bytes byte File data in bytes.
duration System.TimeSpan Specifies how long an item should remain in the cache.
Результат Task

CleanCallback() защищенный Метод

protected CleanCallback ( ) : Task
Результат Task

CleanCallback() защищенный Метод

protected CleanCallback ( object state ) : void
state object
Результат void

ClearAsync() публичный Метод

Clears all cache entries.
public ClearAsync ( ) : Task
Результат Task

CreateCache() публичный статический Метод

Creates new cache default instance.
public static CreateCache ( string cacheName, Configuration configuration ) : SimpleDiskCache
cacheName string Cache name.
configuration Configuration
Результат SimpleDiskCache

ExistsAsync() публичный Метод

Checks if cache entry exists/
public ExistsAsync ( string key ) : Task
key string Key.
Результат Task

GetDuration() защищенный Метод

protected GetDuration ( string text ) : System.TimeSpan
text string
Результат System.TimeSpan

GetFilePathAsync() публичный Метод

public GetFilePathAsync ( string key ) : Task
key string
Результат Task

Init() защищенный Метод

protected Init ( ) : Task
Результат Task

InitializeEntries() защищенный Метод

protected InitializeEntries ( ) : Task
Результат Task

InitializeEntries() защищенный Метод

protected InitializeEntries ( ) : void
Результат void

RemoveAsync() публичный Метод

Removes the specified cache entry.
public RemoveAsync ( string key ) : Task
key string Key.
Результат Task

SimpleDiskCache() публичный Метод

Initializes a new instance of the FFImageLoading.Cache.SimpleDiskCache class.
public SimpleDiskCache ( string cachePath, Configuration configuration ) : System
cachePath string Cache path.
configuration Configuration
Результат System

TryGetStreamAsync() публичный Метод

Tries to get cached file as stream.
public TryGetStreamAsync ( string key ) : Task
key string Key.
Результат Task

WaitForPendingWriteIfExists() защищенный Метод

protected WaitForPendingWriteIfExists ( string key ) : Task
key string
Результат Task