reverse logic for returning from cache in assignCache. Drop searchEnv completely.