fixed generate cache expression for OR statements