Place the vegetable oil in a skillet over medium heat. Add the onions and sugar and mix well.
Cook, stirring frequently, for 20 minutes or until the onions have caramelized. Remove from heat.
In a small bowl combine the mayonnaise, ketchup, pickles, and vinegar. Mix well and set aside.
Add salt and pepper to the ground beef and form into 4 patties.
Heat a large skillet over medium heat and add the burgers.
Cook the burgers for 3 minutes on one side then spread the top with 1 teaspoon of mustard. Flip the burger over, add a piece of cheese, and cook for 3-4 minutes or until the burger is cooked through.
To assemble the burgers place a tablespoon of the mayonnaise mixture on the bottom of the bun.Layer a few pickles, a tomato slice, and some lettuce on top of the bottom bun.
Place a burger on top of the vegetables then top with 1-2 teaspoons of the mayonnaise mixture and some of the caramelized onions. Top with the top of the bun and enjoy!