mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Cache the last modified date in NativeFileStreamFactory
This commit is contained in:
parent
5370d19a8d
commit
2c490f50e7
@ -34,7 +34,16 @@ namespace Wabbajack.Common
|
||||
return await _file.OpenRead();
|
||||
}
|
||||
|
||||
public DateTime LastModifiedUtc => _file.LastModifiedUtc;
|
||||
private DateTime? _lastModifiedCache = null;
|
||||
public DateTime LastModifiedUtc
|
||||
{
|
||||
get
|
||||
{
|
||||
_lastModifiedCache ??= _file.LastModifiedUtc;
|
||||
return _lastModifiedCache.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public IPath Name { get; }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user