I clean quite a few patio cushions both in Autumn and Spring, as ad-on sales, normally when doing other upholstery cleaning.
They are mostly cotton or cotton/polyester so present no particular cleaning problems except in respect of sun-blockers. These products are typically oil-based and after oxidisation and UV baking they can be tenacious. An ammoniated upholstery pre-spray, possibly with some added alcohol is a good approach though if you were UK-based I could recommend an excellent detergent-free cleaner.
What presents the greatest challenge is where a sun-tan lotion incorporates some self-tanning ingredient, and this on a cotton print. The self-tanning additive is a dye and it can penetrate below the print, making effective, non-destructive removal an impossibility.
If you have a steamer you can bring the foam back to live and it helps to rid the foam of odors.
Another thing is to toss the foam onto a cold surface (like cold cement), you do this after steaming it. It will help the foam keep it's shape.
After cleaning mist the fabric with a 50/50 mix Downy fabric softener/water.