Skip to content

Commit 4a52604

Browse files
authored
Merge pull request #506 from iyilm4z/rf-release-date
AppVersionHelper.ReleaseDate cached
2 parents 5bb98b4 + a49c1f3 commit 4a52604

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/AppVersionHelper.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ public class AppVersionHelper
1919
/// Gets release (last build) date of the application.
2020
/// It's shown in the web page.
2121
/// </summary>
22-
public static DateTime ReleaseDate
23-
{
24-
get { return new FileInfo(typeof(AppVersionHelper).GetAssembly().Location).LastWriteTime; }
25-
}
22+
public static DateTime ReleaseDate => LzyReleaseDate.Value;
23+
24+
private static readonly Lazy<DateTime> LzyReleaseDate = new Lazy<DateTime>(() => new FileInfo(typeof(AppVersionHelper).GetAssembly().Location).LastWriteTime);
2625
}
2726
}

0 commit comments

Comments
 (0)