fix: allow concurrent cache access
This commit is contained in:
parent
9866006690
commit
57e13d15a6
2 changed files with 76 additions and 41 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Reference in a new issue