Heat a large skillet over medium-high heat. Add the oil and bacon and brown until crisp; remove to a paper towel-lined plate to drain.
Add the butter to the pan and melt; reduce the heat to medium-low and add the onions. Season with a little salt, freshly ground black pepper, ground thyme and the bay leaf; cook until light caramel in color, about 15 minutes. Add the apple (if using) and cook for 10 minutes more. Add the bourbon to pan and let it evaporate. Add the stock and remove the bay leaf; reduce the heat to low.
To a pot of boiling water, add salt and cook the pasta to al dente. Add a little bit of the starchy cooking water to the onions and drain the pasta. Add it to the skillet and combine with the bacon and onions; adjust the seasonings and serve topped with cheese.