If your cache is so performance critical that you can't lose the data then it sounds like you need a (denormalized) database.