How to cache efficiently Http request under android/ios


My app is downloading a lot of picture (the pictures never change else the url change also), and i want to cache these requests. What is the most efficient way to do so ?

for exemple on android i saw that their is HTTP response cache but i don’t see any equivalent in ios. Maybe the most effective way is to store the downloaded file in the cache directory but i have some question :

1/ how many file i can store in one single directory ? on windows for exemple it’s start to be problematic if more than 10000 files in one single directory. is it the same on android/ios ?

2/ how to know if their is enalf place on the hard drive to store more files ?

3/ how to know the size of all the files in the cache directory to delete old files when the cache dir start to be too big ?

Comments are closed.