C# Class TheChan.Services.Cache.CacheService

Inheritance: ICacheService
Show file Open project: acedened/TheChan

Public Methods

Method Description
ClearCache ( CacheItemType type ) : System.Threading.Tasks.Task
DeleteItemAsync ( string uri, CacheItemType type = CacheItemType.Other ) : System.Threading.Tasks.Task
GetCachedItemsSizeInBytes ( CacheItemType type ) : Task
RetrieveFileAsync ( string url, CacheItemType type = CacheItemType.Other, Action onProgress = null ) : Task
RetrieveStreamAsync ( string url, CacheItemType type = CacheItemType.Other, Action onProgress = null ) : Task

Private Methods

Method Description
DownloadAndGetStream ( string url, StorageFile newFile, Action onProgress ) : Task
DownloadToFile ( string url, StorageFile newFile, Action onProgress ) : System.Threading.Tasks.Task
GetFolderForType ( CacheItemType itemType ) : Task
GetFolderSize ( StorageFolder folder ) : Task
GetOrCreateFile ( string url, CacheItemType type ) : Task

Method Details

ClearCache() public method

public ClearCache ( CacheItemType type ) : System.Threading.Tasks.Task
type CacheItemType
return System.Threading.Tasks.Task

DeleteItemAsync() public method

public DeleteItemAsync ( string uri, CacheItemType type = CacheItemType.Other ) : System.Threading.Tasks.Task
uri string
type CacheItemType
return System.Threading.Tasks.Task

GetCachedItemsSizeInBytes() public method

public GetCachedItemsSizeInBytes ( CacheItemType type ) : Task
type CacheItemType
return Task

RetrieveFileAsync() public method

public RetrieveFileAsync ( string url, CacheItemType type = CacheItemType.Other, Action onProgress = null ) : Task
url string
type CacheItemType
onProgress Action
return Task

RetrieveStreamAsync() public method

public RetrieveStreamAsync ( string url, CacheItemType type = CacheItemType.Other, Action onProgress = null ) : Task
url string
type CacheItemType
onProgress Action
return Task