Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Create cache-busted versions of a file using the MD5 hash of the file's contents.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
History.md
Makefile
Readme.md
index.js
package.json

Readme.md

cache-bust

Create cache-busted versions of a file using the MD5 hash of the file's contents.

Installation

$ npm install cache-bust

Example

var bust = require('cache-bust');
var file = path.resolve(__dirname, 'build.js');

bust(file); // creates a "build-43c191bf6d6c3f263a8cd0efd4a058ab.js"

API

cacheBust(file, [options])

Create a cache-busted version of file in the same directory, removing previously cache-busted copies if they exist.

Options:

{
  remove: false
}

cacheBust.remove(file)

Remove any existing cache-busted versions of a file.

cacheBust.alias(file)

Return the cache-busted alias for a given file.

License

MIT

Something went wrong with that request. Please try again.