use cache for photos.