PersistentImageCache (Kawagoe.Storage)

Implements an ImageCache on top of the isolated storage.

PersistentImageCache is optimized in order to minimize its impact on the UI thread. Images are downloaded and persisted to the isolated storage in a background thread. Only the strict minimum is performed on the UI thread, such as setting the source of the BitmapImage instance.

Images downloaded by PersistentImageCache are persisted to the isolated storage for a maximum amount of time specified by the ExpirationDelay property.

In addition, a PersistentImageCache instance manages an in-memory cache of the most recently used images in order to avoid reading from the isolated storage for frequently requested images. The maximum number of images kept in this in-memory cache is specified by the MemoryCacheCapacity property.


<Image Source="{Binding Source}"/>

public class Model
    private ImageCache _cache = new PersistentImageCache("cache name");

    // ...

    public ImageSource Source
            return _cache.Get(imageUri);

Last edited Sep 5, 2010 at 2:57 PM by andreassaudemont, version 8


rolandinho Feb 6, 2011 at 3:27 PM 
Is there a way to check the download progress of the image?