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

gifByID not pulling from cache #146

Open
n1cameron opened this issue Mar 7, 2021 · 1 comment
Open

gifByID not pulling from cache #146

n1cameron opened this issue Mar 7, 2021 · 1 comment

Comments

@n1cameron
Copy link

In my messaging app, I am sending the media ID. As suggested by the docs, on the receiving end I am loading the image via

         GiphyCore.shared.gifByID(id) { (response, error) in
                    if let media = response?.data {
                        DispatchQueue.main.sync { [weak self] in
                            mediaView.media = media
                        }
                    }
                }

The images are not being cached and only kept while on the chat screen. As soon as leaving the chat screen the images disappear.

How would I be able to use the cache while using gifByID?

@mendimr
Copy link

mendimr commented Aug 13, 2021

Were you able to find any solution for this?
Currently having the same problem, even when scrolling on a collection view gifByID re-downloads the gif.

https://www.dropbox.com/s/sb9ei2cac6f9cqy/giphyGifById.MP4?dl=0

  • Network Link Conditioner is enabled on Edge.
  • Duplicate GIFs have been intentionally added to test the cache.
  • At the end of the video I opened the GIPHY VC to see if the loaded GIFs would load faster.

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

2 participants