ImageCache Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides methods and tools to cache files in a folder
public class ImageCache : Microsoft.Toolkit.Uwp.UI.CacheBase<Windows.UI.Xaml.Media.Imaging.BitmapImage>
type ImageCache = class
inherit CacheBase<BitmapImage>
Public Class ImageCache
Inherits CacheBase(Of BitmapImage)
- Inheritance
Constructors
ImageCache() |
Initializes a new instance of the ImageCache class. |
ImageCache(DispatcherQueue) |
Initializes a new instance of the ImageCache class. |
Properties
CacheDuration |
Gets or sets the life duration of every cache entry. (Inherited from CacheBase<T>) |
DispatcherQueue |
Gets or sets which DispatcherQueue is used to dispatch UI updates. |
HttpClient |
Gets instance of HttpClient (Inherited from CacheBase<T>) |
Instance |
Gets public singleton property. |
MaxMemoryCacheCount |
Gets or sets max in-memory item storage count (Inherited from CacheBase<T>) |
RetryCount |
Gets or sets the number of retries trying to ensure the file is cached. (Inherited from CacheBase<T>) |
Methods
ClearAsync() |
Clears all files in the cache (Inherited from CacheBase<T>) |
ClearAsync(TimeSpan) |
Clears file if it has expired (Inherited from CacheBase<T>) |
GetFileFromCacheAsync(Uri) |
Gets the StorageFile containing cached item for given Uri (Inherited from CacheBase<T>) |
GetFromCacheAsync(Uri, Boolean, CancellationToken, List<KeyValuePair<String,Object>>) |
Retrieves item represented by Uri from the cache. If the item is not found in the cache, it will try to downloaded and saved before returning it to the caller. (Inherited from CacheBase<T>) |
GetFromMemoryCache(Uri) |
Retrieves item represented by Uri from the in-memory cache if it exists and is not out of date. If item is not found or is out of date, default instance of the generic type is returned. (Inherited from CacheBase<T>) |
InitializeAsync(StorageFolder, String, HttpMessageHandler) |
Initializes FileCache and provides root folder and cache folder name (Inherited from CacheBase<T>) |
InitializeTypeAsync(StorageFile, List<KeyValuePair<String,Object>>) |
Cache specific hooks to process items from HTTP response |
InitializeTypeAsync(Stream, List<KeyValuePair<String,Object>>) |
Cache specific hooks to process items from HTTP response |
IsFileOutOfDateAsync(StorageFile, TimeSpan, Boolean) |
Override-able method that checks whether file is valid or not. |
PreCacheAsync(Uri, Boolean, Boolean, CancellationToken) |
Assures that item represented by Uri is cached. (Inherited from CacheBase<T>) |
RemoveAsync(IEnumerable<Uri>) |
Removed items based on uri list passed (Inherited from CacheBase<T>) |
RemoveExpiredAsync(Nullable<TimeSpan>) |
Removes cached files that have expired (Inherited from CacheBase<T>) |