Long story short, after leaving my guitar for a few months, I decided to start practicing again. I plugged my amp and every led blinked at it should. I took my jack and plugged it into the amp. No buzz was emitted by The cable as I touched the tip and inserted into the guitar. No amplification. I decided to leave the guitar and try later. After an hour I tried again and somehow it worked again. I played for a while and the decided to power off my amp. After I while I wanted to play again, and the same thing happend. Is it my cable or my amp?
Several times I've found this with amps not used for a while. The headphone and/or line out socket is switched, and the contacts don't work that well, resulting in no sound. A spray with switch cleaner and plugging/unplugging a jack into these ports had the amps working again.
However, with scant info., it could be one of many diverse problems.
Yes, it's your cable or your amp. Or, as @Tim suggested, a dirty socket either on the guitar or the amp (more likely the amp, as you got no buzz when touching the plug).