This PR fixes an issue with the FileStore, When a pre-existing cache file is overwritten it isn't truncated, this can result in an updated response having remnants of previous responses on the end.
I've replaced File.OpenWrite which uses FileMode.OpenOrCreate with FileMode.Create which will truncate the file if it exists.
This PR fixes an issue with the FileStore, When a pre-existing cache file is overwritten it isn't truncated, this can result in an updated response having remnants of previous responses on the end.
I've replaced
File.OpenWrite
which usesFileMode.OpenOrCreate
withFileMode.Create
which will truncate the file if it exists.Microsoft Docs: System.IO.FileMode