Put walnuts, flour, salt, cayenne and rosemary into a food processor and blend to combine. Add the butter and blend until the mixture resembles coarse crumbs. Add both cheeses and blend until the dough just starts to come together.
Tip the mixture onto baking paper and roll into a cylinder about 36cm long. Refrigerate until firm. (I usually leave it for 30 minutes to an hour.)
Pre-heat oven to 180˚C.
Slice the chilled dough into 1 cm-thick slices and place on a baking tray. Bake for 15 minutes, until golden brown and the centres are firm. Transfer to a rack to cool.
Store in an airtight container.