Issue 6557: Use maps instead of object for the cache.