Closed fmmsilva closed 9 years ago
I need to rebuild the cache when I update the content of an image but use the same filename and all the same filters. I did some updates on some of your classes and I think I got it. Thank you!
Actually there is something you can use - sorry, I forgot about it before ;-)
var imageSource = new FileImageSource
{
FileName = "/myimage.png"
};
DynamicImageCacheManager.Remove(imageSource);
That will remove from the cache any images that use that image source.
There isn't anything built-in for that at the moment. DynamicImage uses cache keys that are built from the composition and all its layers and filters. If you change any property on any of those things, it will result in a new cache key, and a new image.
What's your use-case for having an explicit way to invalidate the cache?