Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix File.Create on Init() not disposed #532

Merged
merged 1 commit into from
Apr 25, 2024
Merged

fix File.Create on Init() not disposed #532

merged 1 commit into from
Apr 25, 2024

Conversation

dplarina
Copy link
Contributor

I'm not sure why this happens and seems to happen more frequently during debugging but sometimes creating the FileStream in InitCacheKey() for the Disk cache provider will fail with "the file is use" because File.Create(path) returns a FileStream that is not closed/disposed.
https://github.com/InspireHUB/EasyCaching/blob/2eb92279d65a3a5f1c9fad1cb4f98344f7c98baa/src/EasyCaching.Disk/DefaultDiskCachingProvider.cs#L167

@catcherwong catcherwong requested a review from Memoyu April 25, 2024 01:07
@Memoyu Memoyu merged commit c52c8f6 into dotnetcore:dev Apr 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants