fixed cache bug in generic_exp.py