Simplify caching to be global unless explicitly disabled.