What is the most efficient way to get and cache a profile image for a user using MGTwitter?
Currently, our problem is that in order to get the image URL, there must be a call getUserInformationFor, and then getImageAtURLthat will lead to two server calls. Currently, we just need image information, so its redundancy should load all the other information. When you remember that we could make 20-30 of these calls right away (for example, get a list of user profile images), this will become rather slow.
Secondly, what is the most efficient way to cache this image so that it doesnβt need to be downloaded every time (we donβt mind assuming that the profile image will never change), at present we are just writing to NSTemporaryDirectory () with the Twitter username as the file name, and then for each Twitter request that checks if the file name exists in this directory. Is there a more efficient approach?
source
share