Skip to content

Commit

Permalink
Transfer disk cache into memory
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jun 21, 2020
1 parent 2ada9bc commit 85be3ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Core/Net/NetFileCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ public string GetFileHashSha1(string filePath)
}
else if (File.Exists(hashFile))
{
return File.ReadAllText(hashFile);
hash = File.ReadAllText(hashFile);
sha1Cache.Add(filePath, hash);
return hash;
}
else
{
Expand Down Expand Up @@ -690,7 +692,9 @@ public string GetFileHashSha256(string filePath)
}
else if (File.Exists(hashFile))
{
return File.ReadAllText(hashFile);
hash = File.ReadAllText(hashFile);
sha256Cache.Add(filePath, hash);
return hash;
}
else
{
Expand Down

0 comments on commit 85be3ba

Please sign in to comment.