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

GIF not cached #817

Closed
harri121 opened this issue Mar 2, 2018 · 9 comments · Fixed by #1405
Closed

GIF not cached #817

harri121 opened this issue Mar 2, 2018 · 9 comments · Fixed by #1405

Comments

@harri121
Copy link

harri121 commented Mar 2, 2018

I am using ASNetworkImageNode to display remote GIFs. The GIFs are not cached but downloaded everytime they are displayed. Not animated images are cached properly.
Am I missing something? Do I have to write a custom cache to cache GIFs?

@ghost
Copy link

ghost commented May 22, 2018

I’m seeing a similar issue. Any workarounds @harri121?

@vldalx
Copy link

vldalx commented Aug 21, 2018

I've got the same issue.

Actually, animated images are cached, but ASNetworkImageNode ignores them and downloads every time.

The problem is here

if ([imageContainer asdk_image] == nil && _downloader != nil) {
[self _downloadImageWithCompletion:^(id<ASImageContainerProtocol> imageContainer, NSError *error, id downloadIdentifier, id userInfo) {
finished(imageContainer, error, downloadIdentifier, ASNetworkImageSourceDownload, userInfo);
}];
} else {

ASNetworkImageNode checks if imageContainer keeps an image, but doesn't check if the one keeps an animated image.

the if condition should be like this

[imageContainer asdk_image] == nil && [imageContainer asdk_animatedImageData] == nil && _downloader != nil

@vldalx
Copy link

vldalx commented Aug 22, 2018

@TextureGroup please, take a look at this issue. the one doesn't seem hard to fix

@SolorzanoJose
Copy link

@TextureGroup can you implement the fix provided above?

@harri121
Copy link
Author

harri121 commented Oct 3, 2018

+1

1 similar comment
@strangeliu
Copy link
Contributor

+1

@citynight
Copy link

I have the same problem. How did you solve it?

@SolorzanoJose
Copy link

@LXZzzzzz there's no way to solve it, these guys need to accept the merge for the fix...

@ay8s
Copy link
Collaborator

ay8s commented Mar 5, 2019

Don't see a PR for this. Feel free to submit one. 👍

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

Successfully merging a pull request may close this issue.

6 participants