A cache-busting module for angularjs (1.1.5 or higher)

Added by: Sam Deering





Stars: 1

Watchers: 1

Forks: 1

Module Description


###What it needs

  • The only requirement is angular 1.1.5 or higher (included in the bower dependency file)

###How it works

  • Include the file in your page and add the 'cacheBuster' module to your angular.module definition
angular.module('yourModule', ['cacheBuster']);
  • (the cacheBuster module takes care of the rest)

###Behind the scenes

  • The cache buster is an interceptor that appends a query param cachebuster with a random number to the end of the url just before the http request goes out.
  • Before it updates its checks the $templateCache to see if the url key exists there. If there is a template in the $templateCache the query param is not added.
    • This means if you use angular-ui's templated code the templates will still get loaded

Module stats last updated: 2015-04-19 02:31:08

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!