23 using System.Collections.Generic;
53 _synchronizer = locker;
65 return _synchronizer.Execute(filePath, () =>
67 if (!File.Exists(filePath))
74 using (var zip = ZipFile.Read(filePath))
77 if (entryName.IsNullOrEmpty())
85 if (!zip.ContainsEntry(entryName))
90 entry = zip[entryName];
94 var stream = new MemoryStream();
95 entry.Extract(stream);
100 catch (ZipException exception)
102 Log.
Error(
"DiskDataCacheProvider.Fetch(): Corrupt file: " + key +
" Error: " + exception);
113 public void Store(
string key,
byte[] data)
117 _synchronizer.Execute(filePath, singleExecution:
false, () =>
128 return _synchronizer.Execute(zipFile, () =>