set environment when clearing cache.