Switched from TTURLCache to ASIDownloadCache
I just switched my app from Three20 to ASI asynchronous requests for downloading OpenCycleMap map tiles to my mapView. ASI seems much simpler to implement (which is perfect for me), but I have two minor issues:
1- If a map tile doesn't exist for a part of the map, ASI continues trying to download it for several minutes, whereas TT stops after a few seconds. I'm worried that this could affect the battery usage of the app.
2- When TT stores the map tile to the cache, it seems to combine the metadata with the .png file. ASI stores the .png and a separate file of the same name with ".cachedheaders" suffix. This means there are twice as many files in the ASIDownloadCache, and the total hard drive space taken up is about 30% more (map tiles range from 8 to 30 KB, cachedheaders files each 4 KB, but there are several thousand of each). I'm afraid this will eat up a lot of disk space, since I want to save cached maps for offline use.
Does anyone know of a workaround for these issues, or should I just live with it? I can provide code snippets later if that helps answer the question.
|