gpt4 book ai didi

c# - 如何在 MVC5 中为 Bundle 启用缓存

转载 作者:太空宇宙 更新时间:2023-11-03 12:09:30 24 4
gpt4 key购买 nike

<分区>

我已经在我的 MVC 项目中创建了样式和脚本包,如下所示。现在我还需要为包启用缓存。有什么方法可以控制这些包的缓存持续时间吗?

bundles.Add(new StyleBundle("~/bundles/css").Include(
"~/lib/bootstrap/css/bootstrap.min.css",
"~/lib/owlcarousel/owl.carousel.min.css",
"~/lib/owlcarousel/owl.theme.default.min.css",
"~/StylesCdn/google-font.css",
"~/assests/css/common.min.css"
));

bundles.Add(new StyleBundle("~/bundles/bottomcss").Include(
"~/lib/chartist/scss/chartist.min.css",
"~/lib/chartist/chartist-plugin-tooltip.min.css",
"~/StylesCdn/export.min.css"
));

bundles.Add(new ScriptBundle("~/bundles/js").Include(
"~/lib/bootstrap/js/jquery.min.js",
"~/assests/js/homelayout.min.js"
));

bundles.Add(new ScriptBundle("~/bundles/bottomjs").Include(
"~/lib/bootstrap/js/bootstrap.min.js",
"~/lib/owlcarousel/owl.carousel.min.js",
"~/assests/js/app.min.js",
"~/Content/Validation.min.js",
"~/assests/js/InvestmentCalculator.min.js",
"~/assests/js/common.min.js",
"~/assests/js/BindDate.min.js"
));

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com