Prior to https://crrev.com/c/5740609, NewContents never flushed cache so the second NewContents() would always produce the same contents post-yapf as as pre-yapf. Flush cache on second NewContents() call to get updated file contents. Also fix the formatting a bit. Bug: b/333744051 Change-Id: Ic627dd72675d7d3694b1978635ae047b38f06596 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357960 Auto-Submit: Gavin Mak <gavinmak@google.com> Commit-Queue: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42677}