title: node.js express JS file caching
body: <p>I am using simple express to serve Backbone project. This is the file that we use:</p>
  
  <pre><code> app.configure('production', function () {
   var myTime = 432000;         //5 days
   app.set('port', process.env.PORT || 80);
   app.use(express.bodyParser());
   app.use(express.methodOverride());
   app.use(allowCrossDomain);
   app.use(app.router);    
   app.use(express.static(__dirname + './../',  { maxAge: myTime } ));
   console.log("SERVING !!!");
  });
  </code></pre>
  
  <p>Every deployment project is optimized using require.js (r.js). Files are Concenated, minified and uglified and deployed to production server.</p>
  
  <p>Problem is the following. Assume I set the cache for 15 days. And on day 3 we deploy new project, meaning new version. Client browser will not pull new javascript's files, as it already has them cashed and valid.</p>
  
  <p>How do I trick the browser to remove its cache with new files?</p>
  
  <p>Thanks :D</p>