Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit f7a1f36

Browse files
author
Mikhail Arkhipov
authored
Stop checking assembly time (#1168)
1 parent 4c5a349 commit f7a1f36

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/Analysis/Ast/Impl/Caching/StubCache.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public string ReadCachedModule(string filePath) {
7070
}
7171

7272
var cachedFileExists = false;
73-
var cachedFileOlderThanAssembly = false;
7473
var cachedFileOlderThanSource = false;
7574
Exception exception = null;
7675

@@ -84,12 +83,7 @@ public string ReadCachedModule(string filePath) {
8483

8584
cachedFileOlderThanSource = cacheTime < sourceTime;
8685
if (!cachedFileOlderThanSource) {
87-
var assemblyTime = _fs.GetLastWriteTimeUtc(GetType().Assembly.Location);
88-
if (assemblyTime > cacheTime) {
89-
cachedFileOlderThanAssembly = true;
90-
} else {
91-
return _fs.ReadTextWithRetry(cachePath);
92-
}
86+
return _fs.ReadTextWithRetry(cachePath);
9387
}
9488
}
9589
} catch (Exception ex) when (!ex.IsCriticalException()) {
@@ -99,8 +93,6 @@ public string ReadCachedModule(string filePath) {
9993
string reason;
10094
if (!cachedFileExists) {
10195
reason = "Cached file does not exist";
102-
} else if (cachedFileOlderThanAssembly) {
103-
reason = "Cached file is older than the assembly.";
10496
} else if (cachedFileOlderThanSource) {
10597
reason = $"Cached file is older than the source {filePath}.";
10698
} else {

0 commit comments

Comments
 (0)