My male cat had Cystitis. The vet told me that this is a problem that mostly occurs in male cats. I had to keep my kitty on a low ash(Magnesium) content cat food diet or it would reoccur. Low ash food can be obtained at the Vets office...I just got mine from any vets office by asking the receptionist to direct me to the special low ash cat food. I think there is also a brand on the market that can be bought at pet food stores as well as some grocery stores. Purina or Friskies might be the brand, can't recall but, I do remember that it clearly states on the box, "Low Ash". You could check at Purina.com or Friskies.com or check Google.com to search.
Good luck...I took my cat off the special food for a week and, he ended up completely blocked up and in the Vet emergency room! Crystals form in the bladder and block the Urethra so that they can't urinate. Apparently the older the cat gets, the more they need that special diet. I had him on this special diet until he passed away from old age. He was an expensive cat to feed!