Preheat your oven to 215ºF (100ºC) and lightly grease a 9-inch (23 cm) square cake pan.
In a large bowl, whisk together the all-purpose flour, rye flour, baking powder, baking soda, and caraway seeds until well combined.
In a spice grinder or mortar and pestle, grind the fennel seeds and anise seeds until finely ground but still with some texture. Add them to the flour mixture and whisk until evenly distributed.
Make a well in the center of the dry ingredients and pour in the buttermilk and dark syrup. Stir just until the dry ingredients are moistened, but do not overmix.
Scrape the batter into the prepared pan and smooth the top.
Bake for 30 minutes at 215ºF (100ºC), then increase the oven temperature to 325ºF (160ºC) and bake for another 30 minutes.
Check for doneness by pressing the center; it should feel firm. If using a thermometer, it should read 190ºF (88ºC).
Remove from the oven and let cool in the pan for a few minutes before transferring to a wire rack to cool completely.