2 tablespoons butter, plus more for dish
1 small onion, minced
Pinch cayenne pepper
1 package frozen spinach, thawed, drained and chopped
1 cup milk
2 eggs
2 cups shredded sharp Cheddar, plus extra for top
4 cups cooked rice
1 teaspoon freshly chopped parsley leaves
1 teaspoon freshly chopped thyme leaves
1 teaspoon chopped basil leaves
Salt and freshly ground black pepper