Added image caching utility