Clears the manager/controller factory caches to avoid side effects