{"id":45055,"library":"grunt-cache-crusher","title":"Grunt Cache Crusher","description":"Grunt plugin for cache busting by appending timestamps or MD5 hashes to asset URLs in HTML files. Based on grunt-cache-breaker. Current version 2.0.0, requires Grunt ~0.4.1 and Node >= 0.8.0. No active development since 2015, considered legacy. Differentiators: supports timestamp query strings, filename-based replacements, and MD5 hashing of file contents to invalidate caches only when files change. Works with Grunt 0.4.x only.","status":"deprecated","version":"2.0.0","language":"javascript","source_language":"en","source_url":"git://github.com/Merk87/grunt-cache-crusher","tags":["javascript","gruntplugin","cache","bust","buster","break"],"install":[{"cmd":"npm install grunt-cache-crusher","lang":"bash","label":"npm"},{"cmd":"yarn add grunt-cache-crusher","lang":"bash","label":"yarn"},{"cmd":"pnpm add grunt-cache-crusher","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency - Grunt ~0.4.1 required","package":"grunt","optional":false}],"imports":[{"note":"Use grunt-cache-crusher, not grunt-cache-breaker. Grunt 0.4.x only.","wrong":"grunt.loadNpmTasks('grunt-cache-breaker');","symbol":"cachebreaker","correct":"grunt.initConfig({ cachebreaker: { ... } }); grunt.loadNpmTasks('grunt-cache-crusher');"}],"quickstart":{"code":"module.exports = function(grunt) {\n  grunt.initConfig({\n    cachebreaker: {\n      dev: {\n        options: {\n          match: ['all.min.js', 'core.min.css'],\n          replacement: 'md5',\n          src: {\n            path: 'public/js/all.min.js'\n          }\n        },\n        files: {\n          src: ['public/index.html']\n        }\n      }\n    }\n  });\n  grunt.loadNpmTasks('grunt-cache-crusher');\n  grunt.registerTask('default', ['cachebreaker']);\n};","lang":"javascript","description":"Gruntfile configuring cachebreaker to replace asset URLs with MD5 hashes in index.html."},"warnings":[{"fix":"Migrate to a modern build tool (webpack, gulp) with cache busting.","message":"Package is deprecated; no updates since 2015. Use modern alternative like gulp-cache-bust or webpack caching.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Stay on Grunt 0.4.x or use a different cache-busting tool.","message":"Grunt ~0.4.1 only, not compatible with Grunt 1.x.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure each match entry has a corresponding src object with path.","message":"If using `replacement: 'md5'`, you must specify `src.path` to the actual file for hashing. Missing this causes errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use * as placeholder for the replaced segment.","message":"Position 'overwrite' requires glob patterns in match (e.g., 'all.*.js') to replace correctly. Incorrect patterns will not match.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'0.4':68 '0.4.1':32 '0.8.0':35 '2.0.0':29 '2015':40 'activ':37 'append':10 'asset':16 'base':21,50 'break':76 'breaker':26 'bust':8,74 'buster':75 'cach':2,7,25,60,73 'chang':64 'consid':41 'content':57 'crusher':3 'current':27 'develop':38 'differenti':43 'file':20,56,63 'filenam':49 'filename-bas':48 'grunt':1,4,24,31,67 'grunt-cache-break':23 'gruntplugin':72 'hash':14,54 'html':19 'invalid':59 'javascript':71 'legaci':42 'md5':13,53 'node':34 'plugin':5 'queri':46 'replac':51 'requir':30 'sinc':39 'string':47 'support':44 'timestamp':11,45 'url':17 'version':28 'work':65 'x':69","created_at":"2026-06-07T12:53:09.569430+00:00","updated_at":"2026-06-07T12:53:09.569430+00:00","problems":[{"fix":"Add grunt.loadNpmTasks('grunt-cache-crusher'); to Gruntfile.","cause":"Grunt not properly loading the plugin task.","error":"Warning: Task \"cachebreaker\" not found. Use --force to continue."},{"fix":"Provide a valid path to the file to be hashed in options.src.path.","cause":"Missing or incorrect src.path when using replacement: 'md5'.","error":"Running \"cachebreaker:dev\" (cachebreaker) task Fatal error: Unable to read file \"\" (Error code: ENOENT)."},{"fix":"Set options.match to an array of strings or objects.","cause":"match option is not an array.","error":"Warning: Invalid options, `match` must be an array. Use --force to continue."},{"fix":"Ensure Node.js is installed correctly (v0.8+).","cause":"Node.js built-in module 'path' missing (unlikely) – possibly environment issue.","error":"Warning: Cannot find module 'path' Use --force to continue."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Merk87/grunt-cache-crusher","github":"git://github.com/Merk87/grunt-cache-crusher","docs":null,"changelog":null,"pypi":null,"npm":"grunt-cache-crusher","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}