What foods should I eat to prevent cystitis?

Depends. Cystitis is inflammation of the bladder. It can be caused by an infection or by interstitial cystitis. Foods wont prevent infectious cystitis but bladder inflammation can happen to some people when they consume carbonated beverages, caffeine or spicy foods.
Porbably not really. Despite hearing some touting magic foods for this or for that, especially cranberry, there has been no known foods able to effectively prevent cystitis (lower UTI). The bottom line is still personal health + lifestyle + preventive use of antibiotics after eliminating potentially correctable underlying causes such as stone, poor bladder emptying, diverticulum, etc. Ask urologist for detail ... .