Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiskCacheDuration is always Zero for Image Loaded via URL in XAML #396

Closed
Karuna30 opened this issue Nov 26, 2016 · 3 comments
Closed

DiskCacheDuration is always Zero for Image Loaded via URL in XAML #396

Karuna30 opened this issue Nov 26, 2016 · 3 comments

Comments

@Karuna30
Copy link

I tried to debug and found that my DiskCacheDuration is never honoured.

DownloadCache

var duration = parameters.CacheDuration.HasValue ? parameters.CacheDuration.Value : configuration.DiskCacheDuration;

Task Parameters have Cache Duration value of Zero and not null.
I am not setting it anywhere in my code.

I am still getting used to C#, but I guess the problem is in setting CacheDuration in CachedImage.

@MrClockOff
Copy link

MrClockOff commented Nov 29, 2016

Hi there,

I can confirm the same behaviour on Windows 8.1. When I navigate to cache folder \TempState\FFSimpleDiskCache all files have *.0 extension which means files are cached for 0 days. Setting CacheDuration in XAML individually for each item does the trick.

The issue was introduced in this commit: 6960cb6

@bmacombe
Copy link

bmacombe commented Dec 1, 2016

I noticed the same problem in a UWP Xamarin Forms app. Ignored the global setting, but worked when the property was set on the control. I subclassed CachedImage as a work around.

@daniel-luberda
Copy link
Member

Nice catch! It's fixed now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants