The present invention is directed to a capsule (11) for containing a food ingredient, adapted to be functionally inserted in the cavity of a food preparation machine (1), characterized in that said capsule (11) comprises at least one resilient portion (17, 19, 20, 21, 22, 23, 25, 26, 27, 29, 31, 33, 34, 35, 38) that is deformable when said capsule is inserted into the machine cavity, and/or when said cavity is closed, and in that at least one machine operational data is function of the elastic deformation properties of the resilient portion.