C# Class FFImageLoading.Cache.SimpleDiskCache

Inheritance: IDiskCache
Afficher le fichier Open project: daniel-luberda/FFImageLoading

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
CleanCallback ( ) : Task
CleanCallback ( object state ) : void
GetDuration ( string text ) : System.TimeSpan
Init ( ) : Task
InitializeEntries ( ) : Task
InitializeEntries ( ) : void
WaitForPendingWriteIfExists ( string key ) : Task

Method Details

AddToSavingQueueIfNotExistsAsync() public méthode

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.
Résultat Task

CleanCallback() protected méthode

protected CleanCallback ( ) : Task
Résultat Task

CleanCallback() protected méthode

protected CleanCallback ( object state ) : void
state object
Résultat void

ClearAsync() public méthode

Clears all cache entries.
public ClearAsync ( ) : Task
Résultat Task

CreateCache() public static méthode

Creates new cache default instance.
public static CreateCache ( string cacheName, Configuration configuration ) : SimpleDiskCache
cacheName string Cache name.
configuration Configuration
Résultat SimpleDiskCache

ExistsAsync() public méthode

Checks if cache entry exists/
public ExistsAsync ( string key ) : Task
key string Key.
Résultat Task

GetDuration() protected méthode

protected GetDuration ( string text ) : System.TimeSpan
text string
Résultat System.TimeSpan

GetFilePathAsync() public méthode

public GetFilePathAsync ( string key ) : Task
key string
Résultat Task

Init() protected méthode

protected Init ( ) : Task
Résultat Task

InitializeEntries() protected méthode

protected InitializeEntries ( ) : Task
Résultat Task

InitializeEntries() protected méthode

protected InitializeEntries ( ) : void
Résultat void

RemoveAsync() public méthode

Removes the specified cache entry.
public RemoveAsync ( string key ) : Task
key string Key.
Résultat Task

SimpleDiskCache() public méthode

Initializes a new instance of the FFImageLoading.Cache.SimpleDiskCache class.
public SimpleDiskCache ( string cachePath, Configuration configuration ) : System
cachePath string Cache path.
configuration Configuration
Résultat System

TryGetStreamAsync() public méthode

Tries to get cached file as stream.
public TryGetStreamAsync ( string key ) : Task
key string Key.
Résultat Task

WaitForPendingWriteIfExists() protected méthode

protected WaitForPendingWriteIfExists ( string key ) : Task
key string
Résultat Task