Não é possível acessar o fluxo fechado

Estou tentando usar oCache do Bloco de Aplicativos para armazenar em cache algumas imagens (essas imagens levam muito tempo para serem renderizadas)

  BitmapSource bitmapSource; ///some bitmap source already created
  _cache ///  Caching Application Block
  String someId; //id for this image, used as the key for the cache

  using (var stream = new MemoryStream())
    {
        PngBitmapEncoder encoder = new PngBitmapEncoder();
        encoder.Interlace = PngInterlaceOption.On;
        encoder.Frames.Add(BitmapFrame.Create(bitmapSource));             
        encoder.Save(stream);
        _cache.Add(someId, stream);
    }

E carregue-os usando:

imStream = (Stream)_cache.GetData(someId));
if (imStream != null)
{
    PngBitmapDecoder decoder = new PngBitmapDecoder(imStream,  BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
    return decoder.Frames[0];  //return the bitmap source
}

Mas durante o carregamento, recebo a seguinte exceção na linha "new PngBitmapDecoder":

"Não é possível acessar um fluxo fechado.

Entendo que fechei o fluxo no código acima, mas _cache.Add () está fazendo uma cópia (via serialização) antes de sair? Qual é o processo correto de serializar o fluxo?

Obrigado!

questionAnswers(2)

yourAnswerToTheQuestion