Implementation of ImageCache