allow specification of an environment to use for the handling of the cached variable