In a mixing bowl, combine the grated cheese, finely chopped nuts, mayonnaise, and grated onion. Season the mixture with a pinch of cayenne and black pepper according to taste. Stir thoroughly until the ingredients are evenly incorporated. Line a 5- or 6-cup ring mold with plastic wrap for easier unmolding. Spoon the cheese mixture into the mold, pressing it in gently to maintain shape. Cover and refrigerate for several hours, preferably overnight, until firm. When ready to serve, remove from the mold onto a serving plate. If desired, fill the center cavity with strawberry preserves or offer them on the side along with crackers.