0

We are using asp.net-mvc-5 with Bundling and minification that having cache problem: (browser cached old bundle files after code upgrade in server and every client needs to delete browser cache by manual). Without setting HttpCacheability.NoCache because we need data cache to be alive. Only request to clear the bundle cache.

How to force BundleCollection to flush cached script bundles in MVC4

MVC4 StyleBundle: Can you add a cache-busting query string in Debug mode?

I have already tried these two solution but its not working for my scenario. Kindly provide a solution to clear client browser caches after each bundle file upgrade or provide functionality to retrieve latest bundles.

Ethiraj
  • 117
  • 1
  • 12
  • Once you used to bundle all files stored in cache if you change any file it's not you reflated need to hard reload or clear cache. – jishan siddique Oct 16 '19 at 08:29
  • Example `@Scripts.Render("~/bundles/bootstrap")` you have maybe use like this so please try to add some configuration like `@Scripts.Render("~/bundles/bootstrap?x=1")` very first if you have changed inside the file then just changes query string value like this `@Scripts.Render("~/bundles/bootstrap?x=2")` – jishan siddique Oct 16 '19 at 08:32
  • It doesn't work for my scenario because I'm using bundle in my master application and that service are pointed out by several sub application. so I can't able to make changes in sub application like this `@Scripts.Render("~/bundles/bootstrap?x=1")` – Ethiraj Oct 16 '19 at 09:47

0 Answers0