Optimization cache by @yaoli - copy

Test copy without ipdb import. Used to run clean tests on Travis.
You don't need update here.  You can just set the relevant key directly.