答案 0 :(得分:1)
您可以在包含CSS / JS文件的剃须刀页面的asp-append-version="true"
或script
标签中添加link
。
Abp确实提供了在运行时创建的动态脚本。因此,如https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3673
所述,您可以缓存的内容受到限制。答案 1 :(得分:1)
我已经找到原因,默认情况下ASPNET零禁用客户端缓存。我的解决方案只是注释了下面的代码行
protected override void Application_BeginRequest(object sender, EventArgs e)
{
base.Application_BeginRequest(sender, e);
//DisableClientCache();
}
private void DisableClientCache()
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(CacheExpireDate);
Response.Cache.SetNoStore();
}