Caching variable selection