A guinea pig actually is safer in it's cage, provided that you have a good cage for it. It's far more likely to be hurt or get lost if it's out of it's cage. Also, the guinea pig wants to make a home and/or nest and wants bedding material, such as wood shavings. You need to ask the pet store people what would be good bedding material for your guinea pig.
Get your guinea pig out of it's cage to play with it or just to hold it, but it needs to be in it's cage the rest of the time.
No foods really extends your guinea pigs life. I've had four guinea pigs in the past and have two new ones right know. i get my guinea pigs in sets of two so they keep each other company all of my guinea pigs have lived long lives and one of my first guineas pigs lived up to seven years. All i did was feed it fruits and veggies take it outside in the summer and let it eat grass, spend time with it, and let it run around. i made a big cage for my guinea pigs so they can run around outside and i also let them run around in a closed off area in my house. so really if you spend lots of time with it and take good care of your guinea pig it should live a long healthy life. **** make sure that if you have a cage outside to make sure it have a lid on it so other animals can't get at your piggy and also to always watch it and never leave it alone****