It WAS a long time SINCE I HAD EATEN such a good cake. (Timeline- In 2015 I ATE a really good cake. The last good cake was in 2002! Basically a past, and a past before a past. The 'past' can be quite recent - I could be talking about last night! But my focus is on the past event of eating that delicious cake)
It HAS BEEN a long time SINCE I HAVE EATEN such a good cake. (Timeline - TODAY I ate a really good cake. I think the last good cake I ate was in 2002! We are talking about the PRESENT, and the past. The focus is much more on the present, and my full stomach! Of course, I could have eaten it yesterday, or last week, but my focus is on the present, how I feel NOW)
If you want the 'NOT' in it, turn it around a little. "I have NOT eaten such a good cake FOR/IN a long time!" (Present/ I ate it today or recently)
Or, "I HAD NOT EATEN such a good cake for/in a long time." (I ate it last week/last year/etc.)
If you want the 'since' in as well as the 'not' ... I ate a delicious cake yesterday. I can still taste it! Yum! I have NOT eaten such a tasty cake SINCE my Aunt Mary died. Aunt Mary was a brilliant cook. (for the 'since' to work with the 'not' you will need a specific date. You do not need the date STATED (July/last night/2002/April 16th 1998 etc.) but it must be IMPLIED. Aunt Mary DIED on a PARTICULAR date.
It's the same with "... since I had eaten." The date of the 'eating of the cake' is not stated, but it obviously was on a particular day (even if you don't remember it).