question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CachedImage.InvalidateCache has no effect

See original GitHub issue

Hi,

I have a listview with CachedImages bound to an ObservableCollection. When I change elements of the ObservableCollection the Image get’s updated. In cases if only the underlying Imagefile changes I want to have the Image Updated. I’m trying this by calling

        CachedImage.InvalidateCache(imagepath, FFImageLoading.Cache.CacheType.Disk);

But nothing is updated.

This is the Bound Object:

    [ImplementPropertyChanged]
    [JsonObject(IsReference = true)]
    public class CatalogueEntry : INotifyPropertyChanged
    {
        [JsonProperty(IsReference = true)] 
        private Catalogue catalogue;

        public CatalogueEntry(Catalogue parent)
        {
            catalogue = parent;
        }

        public string Name { get; set; }

        public string Description { get; set; }

        public string UUID { get; set; }

        public string ThumbPath
        {
            get { return catalogue.FolderPath + UUID + ".jpg"; }
        }

        public Catalogue Parent
        {
            get { return catalogue; }

            set { catalogue = value; }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }

In Xaml I bind ImageSource to ThumbPath.

What should I do?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
daniel-luberdacommented, Feb 19, 2016

You should reapply the source

eg.

var previous = ThumbPath;
ThumbPath = null;
ThumbPath = previous;

or call new ReloadImage method (not available on nuget yet).

0reactions
daniel-luberdacommented, Feb 24, 2016

It’s fixed in RC2 nuget (use new methods)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker compose does not completely invalidate cache ...
If the base image has changed, this will invalidate the cache, and so you don't need --no-cache here. This will also work with...
Read more >
How do I invalidate cache of an embedded view?
According to this page node_list can be used for node listings to invalidate the cache whenever a node is updated. But it has...
Read more >
Change Log - Coil
Coil 2.0 has its own disk cache implementation and no longer relies on OkHttp for disk caching. Use ImageLoader.Builder.diskCache and DiskCache.Builder to ...
Read more >
Image caching
During local builds, there is no need for a remote or persistent caching ... they are unlikely to invalidate a more stable cached...
Read more >
Fabric.js Object caching
noScaleCache default to true, disable cache regeneration for scale operation. It can be enabled to avoid blurry effects for big scaling. cacheProperties Every ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found