File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 1
1
@using System .Globalization
2
+ @using Abp .AspNetCore .Mvc .Caching
3
+ @using Abp .CachedUniqueKeys
2
4
@inject AbpCompanyName .AbpProjectName .Timing .AppTimes AppTimes
3
-
5
+ @inject ICachedUniqueKeyPerUser CachedUniqueKeyPerUser
6
+ @inject IGetScriptsResponsePerUserConfiguration GetScriptsResponsePerUserConfiguration
4
7
5
8
<environment names =" Development" >
6
9
@* core scripts start*@
81
84
82
85
<!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
83
86
<script src =" ~/AbpServiceProxies/GetAll?v=@(AppTimes.StartupTime.Ticks)" type =" text/javascript" ></script >
84
- <script src =" ~/AbpScripts/GetScripts?v=@(AppTimes.StartupTime.Ticks)" type =" text/javascript" ></script >
87
+
88
+ @if (GetScriptsResponsePerUserConfiguration .IsEnabled )
89
+ {
90
+ <script src =" @(ApplicationPath)AbpScripts/GetScripts?v=@(await CachedUniqueKeyPerUser.GetKeyAsync(GetScriptsResponsePerUserCache.CacheName))" type =" text/javascript" ></script >
91
+ }
92
+ else
93
+ {
94
+ <script src =" @(ApplicationPath)AbpScripts/GetScripts?v=@(AppTimes.StartupTime.Ticks)" type =" text/javascript" ></script >
95
+ }
Original file line number Diff line number Diff line change 1
1
@using System .Globalization
2
+ @using Abp .AspNetCore .Mvc .Caching
3
+ @using Abp .CachedUniqueKeys
2
4
@inject AbpCompanyName .AbpProjectName .Timing .AppTimes AppTimes
5
+ @inject ICachedUniqueKeyPerUser CachedUniqueKeyPerUser
6
+ @inject IGetScriptsResponsePerUserConfiguration GetScriptsResponsePerUserConfiguration
3
7
4
8
<environment names =" Development" >
5
9
@* core scripts start*@
92
96
93
97
<!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
94
98
<script src =" ~/AbpServiceProxies/GetAll?v=@(AppTimes.StartupTime.Ticks)" type =" text/javascript" ></script >
95
- <script src =" ~/AbpScripts/GetScripts?v=@(AppTimes.StartupTime.Ticks)" type =" text/javascript" ></script >
99
+
100
+ @if (GetScriptsResponsePerUserConfiguration .IsEnabled )
101
+ {
102
+ <script src =" @(ApplicationPath)AbpScripts/GetScripts?v=@(await CachedUniqueKeyPerUser.GetKeyAsync(GetScriptsResponsePerUserCache.CacheName))" type =" text/javascript" ></script >
103
+ }
104
+ else
105
+ {
106
+ <script src =" @(ApplicationPath)AbpScripts/GetScripts?v=@(AppTimes.StartupTime.Ticks)" type =" text/javascript" ></script >
107
+ }
You can’t perform that action at this time.
0 commit comments