Cache unused local vars

removes unused local vars in Cache as reported by phpstorm.