我已经在我的 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"
));
我是一名优秀的程序员,十分优秀!