We stopped in Lima for 2 days on our way to Cusco/MP a few weeks ago. I think 2 days was just enough to see everything we wanted to see. If food/nightlife/parties is your thing, then maybe there's much more to see. But in terms of historic, cultural, etc - a day downtown and a day around Miraflores was enough.
Cusco, Sacred Valley, etc., was much more interesting and much more worth the time invested.