title: How to cachebust css & javascript files smartly?
body: <p>It is an old question to cache well files BUT to be sure that the last version will be served when you updated some modifications on some files. For example it is well know that you can append a get variable like a timestamp to the file uri BUT you lost all cache advantages, the files will NEVER be cached, duh !
  For the moment the best way I found trought some web suggestions is :</p>
  
  <ul>
  <li>add expire infos in the htaccess, ex : ExpiresByType text/javascript
  "access plus 7 days"</li>
  <li>request for fileName+'-'+lastModifTimestamp(src)+fileExtension, ex : 'dir/usualfilename-345678.js'. the lastModifTimestamp is set by
  server script like PHP filemtime($src)</li>
  <li>then in the htaccess, add a rewriterule that rewrite 'dir/usualfilename-2345678.js' to 'dir/usualfilename.js' : <code>RewriteRule (.+)-[0-9]+(\.(js|css))$ $1$2 [L]</code></li>
  </ul>
  
  <p>The advantages is that you never have to change the file names you work with, and even how smartly or weirdly your visitor browser acts, the cache is effective AND you are sure it gets the updated files if modified.</p>
  
  <p>Then in my dojoConfig (dojo 1.7+), I have for example a package wich I like all modules paths been suffixed with the last modif timestamp (my dojo config is written dinamically with PHP). The only way I found is to play with the aliases property : I have to alias all my package's files, the problem is it is quite heavy, then if I have 100 modules in my package, I will need 100 declared aliases even if I require only 3 files...it is not very 'dynamic'. The cachebust property is near but it is for ALL files and it is problematic as explained upper.</p>
  
  <p>My questions are :</p>
  
  <ol>
  <li>do you know a better way to manage cache AND updated files as
  mentionned</li>
  <li>in dojoConfig, is there some smart ways to apply this operation on
  some package files ?</li>
  </ol>
  
  <p>Thank you for any infos !</p>