Base solution for your next web application
Open Closed

Bundles not caching #3681


User avatar
0
PhilWynn created

Hi,

I am currently on v4.0 of ASPNET Zero using MVC jQuery. Having experienced some performance issues I have discovered that the bundles generated by the system are not being cached on the client. All bundle headers (along with other static content) seem to be setting Cache-Control to "no-cache".

I have spent some time trying to determine why this is the case, but have not been able to find the cause.

When I create and run a Demo from your site (I assume this is running v4.2 with Angular) I see that bundles are caching as expected.

Please advise. Regards


5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi

    I've made a test to see if the bundles are set to not cache. But I couldn't see any symptom for this. In the screenshots I see that chrome successfully cached bundled js. Is there any possibility that you've checked "disable cache" for chrome devtool?

  • User Avatar
    0
    PhilWynn created

    Hi,

    I am definitely not setting "disable cache" as the attached image will show. I get similar results when running locally or hosted on Azure.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @PhilWynn,

    You might need to remove this from your project <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/Global.asax.cs#L63">https://github.com/aspnetzero/aspnet-ze ... sax.cs#L63</a>.

    Thanks.

  • User Avatar
    0
    PhilWynn created

    Apologies for the delayed response, I have been away in the sun for a week.

    Thanks for that. Any reason why client cache is disabled by default in the system?

    Regards

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @PhilWynn,

    It was really long time ago and I don't remember exact reason for this :). But it is probably not caching ABP's dynamic client side scripts.