Milk is rich in nutrients, but is also highly perishable. In order to preserve it, it needs to be transformed, into cheese for example. This process involves coagulating milk and draining off excess liquid. Humans realised the usefulness of this technique very early on and began to produce curd cheese in the 5th millennium BCE. Hard, cooked-curd cheeses such as Gruyère appeared in the late Middle Ages.