How do I clear deleted contacts and imessages from my iphone 4s cache?
Restrore as a new device, or: Settings>General>Reset>Erase All Content & Settings.
will this erase my contacts and apps?
It will erase EVERYTHING. You then setup as a new device & sync your content back to your phone. Either that, or you live with it. The data will eventually be overwritten as you use your phone.
Retrieving data ...