Dinosaurs lived millions of years ago and died out around 65 million years back—long before any humans, let alone cave people, existed. The leading explanation is a massive asteroid impact that dramatically changed the planet's climate.
So while it's a fun story to imagine otherwise, dinosaurs and humans never actually crossed paths.