Spoilers! (As if you’ve never seen ‘Aladdin’…)
After Jafar is trapped in the lamp at the end of the film, Genie pitches the lamp like a baseball into the desert as he says “10,000 years in the Cave of Wonders oughta chill him out!”
And at the start of the film, he says “10,000 years… will give you such a crick in the neck!”
So we know that Genie has spent 10,000 years in the Cave, and that he expects Jafar to do the same.
From this, should we assume that 10,000 years ago, Genie was in some was a bad guy? Maybe a human like Jafar who was trapped in the lamp in a similar situation? And the 10,000 years he spent in the lamp in the Cave just served to ‘chill him out’ and make him the loveable Genie we all remember?
I don’t know, I’m probably just reading too much into what was supposed to be a throw-away line, but it’s fun to speculate! :)