Basic image cache. For caching image into memory or disk.