(Assignment 5 Tasks 4 and 5) Caches downloaded images.