Just returned from Lima and spent 4 days/3 nights. I thought it was adequate.
We stayed at Sheraton in downtown (although most would recommend staying in Miraflores, IMHO it is a great deal to redeem 3000 SPG points per night for Sheraton plus free shuttle to Miraflores).
We had late night departure passed midnight back to the US so got one extra day.
I also highly recommend Mirabus night tour, 3 hours for 50 Sols (Wednesday to Sunday) leaving from Miraflores. If you are interested, you may want to book ahead while you are in Lima.
Lima is an interesting city and if you are not afraid, do visit some commercial markets - during the day of course.