Mary Mac's Tea Room Tomato Pie

2 tablespoons olive oil
2 medium sweet onions (thinly sliced)
salt and freshly ground black pepper
1 box of Ritz crackers
2 28 ounce cans diced tomatoes (undrained)
1 cup mayonnaise
1 1/2 cup grated extra sharp Cheddar cheese
1 cup grated Parmesan cheese
3 tablespoons chopped fresh basil
Butter for greasing

Preheat the oven to 350°F.
Grease a 13 by 9-inch baking dish with olive oil or butter.
Heat the 2 tablespoons olive oil in a large skillet over medium heat;
add the onions and cook, stirring occasionally, until soft and translucent, 4 to 5 minutes.
Add the salt and pepper to taste, remove from the heat, and set aside.
Crush 2 sleeves of Ritz crackers by hand or in a food processor.
Reserve 1/2 cup of the cracker crumbs for the topping.
Place half of the remaining cracker crumbs in the bottom of the baking dish and pour 1 can of the diced tomatoes,
with juice, over the cracker crumbs.
Layer half of the the sautéed onions on top of the tomatoes,
and repeat the layering process using the rest of the tomatoes and onions.
Sprinkle the remaining half of the cracker crumbs over the tomato mixture.
In a bowl, combine the mayonnaise, Cheddar cheese, Parmesan cheese, and basil.
Spread the mixture over the layers and sprinkle the reserved 1/2 cup cracker crumbs on top.
Bake for 30 to 40 minutes, until the top is golden brown.