###CacheKiller An easy way to prevent caching of js and css files by browser if they are changed. ###CacheKiller.Bundles Prevent bundle files to be cached in case otpimization is turned off. Also allow to turn of optimization for particular bundle.
###If you are using dotless you should adopt configuration
<dotless disableParameters="true" />
- Install CacheKiller via NuGet or CacheKiller.Bundles it will add CacheKiller as well.
- Now in cshtml you can call CacheKiller.ScriptsRenderer.Render, CacheKiller.StylesRenderer.Render or CacheKiller.Bundles.ScriptsRenderer.Render, CacheKiller.Bundles.StylesRenderer.Render for bundles
###Usage sample Original
<link href="~/Content/bootstrap.css" rel="stylesheet">
<script src="~/Scripts/jquery-1.10.2.js"></script>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/jquery")
Updated
@CacheKiller.StylesRenderer.Render("~/Content/bootstrap.css")
@CacheKiller.ScriptsRenderer.Render("~/Scripts/jquery-1.10.2.js")
@CacheKiller.Bundles.StylesRenderer.Render("~/Content/css")
@CacheKiller.Bundles.ScriptsRenderer.Render("~/bundles/jquery")
In case if you use bundles you are free to use only CacheKiller.Bundles.StylesRenderer.Render and CacheKiller.Bundles.ScriptsRenderer.Render.
@CacheKiller.Bundles.StylesRenderer.Render("~/Content/bootstrap.css")
@CacheKiller.Bundles.ScriptsRenderer.Render("~/Scripts/jquery-1.10.2.js")
@CacheKiller.Bundles.StylesRenderer.Render("~/Content/css")
@CacheKiller.Bundles.ScriptsRenderer.Render("~/bundles/jquery")
Licensed under the MIT License.