cached Solve implementation