From 5c78d2d145ad2a1176c1ccc9cb5ecc9f1a1d9f67 Mon Sep 17 00:00:00 2001 From: Daniel Plarina Date: Wed, 24 Apr 2024 14:10:41 -0400 Subject: [PATCH] fix File.Create on Init() not disposed --- src/EasyCaching.Disk/DefaultDiskCachingProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EasyCaching.Disk/DefaultDiskCachingProvider.cs b/src/EasyCaching.Disk/DefaultDiskCachingProvider.cs index 558dc40b..1acea1d6 100644 --- a/src/EasyCaching.Disk/DefaultDiskCachingProvider.cs +++ b/src/EasyCaching.Disk/DefaultDiskCachingProvider.cs @@ -115,7 +115,7 @@ private void Init() if (!File.Exists(path)) { - File.Create(path); + using (File.Create(path)) {} } InitCacheKey();