Place a small dutch oven over medium heat and add a couple of tablespoons of the olive oil.
Add the onions, and sauté until they are softened and beginning to brown, about 3-5 minutes.
Remove the dutch oven from the heat, and add the remaining olive oil, chickpeas, capers, sliced chili, salt, pepper, and thyme sprigs. Stir to combine. Arrange lemon slices over the top of the chickpeas.
Cover with a lid, or with foil if your dish doesn't have a lid, and place in the oven. Bake for 30-35 minutes until the oil is bubbling and the chickpeas are soft.
Remove from the oven and allow to cool for 10-15 minutes. Sprinkle the top with cheese if you're using it.