Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adampatterson/b4c4c030f03c27f90d3257e5015d18f6 to your computer and use it in GitHub Desktop.
Save adampatterson/b4c4c030f03c27f90d3257e5015d18f6 to your computer and use it in GitHub Desktop.
Laravel Cache Buster
gulp.task('cacheBuster', function(cb){
//new Date().getTime()
fs.writeFile('config/cacheBuster.php', '<?php return ' + new Date().getTime() + ';', cb);
});
@adampatterson
Copy link
Author

Call with something like /static/js/vendor.js?{{Config::get('cacheBuster')}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment