fix: allow concurrent cache access

This commit is contained in:
ThetaDev 2022-09-27 21:34:38 +02:00
parent 9866006690
commit 57e13d15a6
2 changed files with 76 additions and 41 deletions

View file

@ -44,6 +44,10 @@ impl CacheStorage for FileStorage {
}
fn read(&self) -> Option<String> {
if !self.path.exists() {
return None;
}
match fs::read_to_string(&self.path) {
Ok(data) => Some(data),
Err(e) => {