Implemented an image cache