Optimization cache by @yaoli - copy

Test copy without ipdb import. Used to run clean tests on Travis.
Don't leave debug code in the final version.  Even if commented out.