Allow to retrieve cache from MetadataFactory

I need to clear the cache from a CLI tool, not being able to access the cache from the MetadataFactory is a bit annoying. I think we should be able to access it.