perf: restore cache at `withoutModifyingMCtx`

instead of resetting it.
diff --git a/src/Lean/Meta/Basic.lean b/src/Lean/Meta/Basic.lean
index a86e48f..4d3fb87 100644
--- a/src/Lean/Meta/Basic.lean
+++ b/src/Lean/Meta/Basic.lean
@@ -1972,11 +1972,11 @@
 def withoutModifyingMCtx : n α → n α :=
   mapMetaM fun x => do
     let mctx ← getMCtx
+    let cache := (← get).cache
     try
       x
     finally
-      resetCache
-      setMCtx mctx
+      modify fun s => { s with cache, mctx }
 
 @[inline] private def approxDefEqImp (x : MetaM α) : MetaM α :=
   withConfig (fun config => { config with foApprox := true, ctxApprox := true, quasiPatternApprox := true}) x