The first answer is going to seem like a joke, but I assure you that it’s not: Don’t smell it.
By that I mean, if it’s starting to smell at all, then out it goes. Outside the house, that is, into the big bin. And if it’s very smelly, then I make sure it goes into an unbroken plastic bag that is then sealed.
Because I don’t use a “trash can” in the house. When I buy groceries I get a paper bag inside a plastic bag and simply use that as my trash container. If I have a specific need for plastic bags, then I have a stand-up covered plastic trash can with a lid – but I seldom use that. I haven’t used it in all of 2011 so far, for example.
And compost, by which I mean vegetable and some paper only, go directly into closed containers outside the house at appropriate intervals – which means “when the indoor container is full” or “when I can get a whiff of it”. And those containers, outside, do have an unpleasant aroma about them when I take off the lids.