Some cheeses can last up to 4 months if kept properly sealed and cold enough in the refrigerator but cheeses such as Parmesan or blocks of Cheddar Cheese can last up to only 6 months.
If you freeze the cheese it can last up to a year but freezing cheese can change the taste and texture of the cheese and make it crumbly.
However the cheese is still good and is best used for cooking with if you freeze it since you won't really notice the change in taste and texture in the cooked foods.