Fix #604: Add option to optimizer to not un-cache