Implemented file caching for photos images.