Skip to content

Commit

Permalink
Truncate existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
LXGaming authored and aliostad committed Sep 22, 2022
1 parent 6fe4ab6 commit 887f111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CacheCow.Client.FileCacheStore/FileStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public async Task<HttpResponseMessage> GetValueAsync(CacheKey key)
/// <inheritdoc />
public async Task AddOrUpdateAsync(CacheKey key, HttpResponseMessage response)
{
using (var fs = File.OpenWrite(_pathFor(key)))
using (var fs = File.Open(_pathFor(key), FileMode.Create, FileAccess.Write, FileShare.None))
{
await _serializer.SerializeAsync(response, fs);
}
Expand Down

0 comments on commit 887f111

Please sign in to comment.