Caffein v. decaf

If I drink coffee without eating, it causes a spike. I can have a cup of coffee with breakfast and it doesn’t cause a problem. I have also noticed that diet coke zero does not affect my blood sugar. During the day I either drink water or decaf green tea. I used to drink very strong hot black teas, but that is a problem for me, so I gave that up. I can’t understand why coffee alone would cause a problem, but not with food. The only thing I know for sure about me and my unkind friend, diabetes, is that nothing seems to make any sense, and it changes day to day, hour to hour.