When to Cache a Photo

Is there a general rule or rule of thumb when I should cache a photo?

For example, I have a grid view of smaller icon images. This page is not at the beginning of the application, so there is no guarantee that the user will see it, these images can change on the server side, but for the most part they will not. Do I have to cache them because they are so many or not bother because they are small?

Another example would be if I click on one of the images mentioned above, it will lead me to a view with one large image, should this image be cached as it is larger or should I allow the user to make a network request every time?

I am not looking for an answer to these specific questions, but rather a guide.

To clarify using caching, I mean saving the file for storage. Also, is there a better way than this?

Thanks for the help!

+3
source share
1 answer

Caching is an important feature in the user interface, so even if there is no guarantee that the user will see this particular page, this is a nice thing.

Saving images in the cache directly depends on many variables:
- How long does it take to restore images if they are not cached
- How many images we talk about - How often do they change - What size of each image

, 100 , , . 200 1024x768, , ... ? .

. .

. , , , .

+1

All Articles