mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 48 forks source link

Rebuild CSS/JS after IIS restart #211

Closed jammykam closed 12 years ago

jammykam commented 12 years ago

Is there some config setting that will force rebuild of the CSS/JS after an IIS restart or the AppPool is recycled?

After we do a deployment we have to either delete all the files from the RequestReduceContent file or flush through the dashboard. Unfortunately people keep forgetting to so this! Also, it would be safe to assume that after a deployment we need this to happen automatically anyway since it is more than likely there would have been changes to the css/js.

Am I missing something or can you add this feature in?

thanks

mwrock commented 12 years ago

This is definitely a pain point shared by others. One feature I'd love to add to RR is the ability to determine when a script or css changes and then force a reprocessing. In the meantime I'd suggest one of these:

  1. The best practice here is to version your js/css files in such a way that changes will result in a changed url. This would also invoke a RR reprocessing.
  2. While the above is a best practice, there is reality. One other thing you can do is add a step to your deployment script that will delete all files from your RR directory. If your RR resources are on a single server, that will essentially be equivilent to flushing the cache.

Hope that helps.

jammykam commented 12 years ago

Thanks, it's annoying. Unfortunately the server is only accessible by VPN so we cannot run it from our build/deployment server. It's all a bit manual at the moment but we'll have to add this in as a step in our deployment process (at the moment people keep forgetting to do this and then complain there's still a bug...)

I've previously used http://clientdependency.codeplex.com/ so it may be something you can look at from their code.

thanks.