{"id":18423804,"url":"https://github.com/realaravinth/cache-buster","last_synced_at":"2025-04-13T16:16:10.915Z","repository":{"id":105008156,"uuid":"355929098","full_name":"realaravinth/cache-buster","owner":"realaravinth","description":"A library that aids in static asset cache busting with SHA-256 hashes","archived":false,"fork":false,"pushed_at":"2022-05-06T11:31:36.000Z","size":4058,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T16:16:03.726Z","etag":null,"topics":["cache-buster","cache-busting","rust","static-files","web"],"latest_commit_sha":null,"homepage":"https://realaravinth.github.io/cache-buster/cache_buster/index.html","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realaravinth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-08T13:59:05.000Z","updated_at":"2021-12-17T06:30:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"216342d3-671c-44cc-93d2-ee68e160f702","html_url":"https://github.com/realaravinth/cache-buster","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realaravinth%2Fcache-buster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realaravinth%2Fcache-buster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realaravinth%2Fcache-buster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realaravinth%2Fcache-buster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realaravinth","download_url":"https://codeload.github.com/realaravinth/cache-buster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741194,"owners_count":21154255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache-buster","cache-busting","rust","static-files","web"],"created_at":"2024-11-06T04:38:44.784Z","updated_at":"2025-04-13T16:16:10.895Z","avatar_url":"https://github.com/realaravinth.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg\nwidth=\"250px\"\n  class=\"greetings\"\n  src=\"./examples/actix-web/static/cachable/img/Spock_vulcan-salute.png\"\n  alt=\"logo image\"\n/\u003e\n\u003ch1\u003e\n  Cache Buster\n\u003c/h1\u003e\n\u003cp\u003e\n  \u003cstrong\u003eMay your cache live long and prosper!\u003c/strong\u003e\n\u003c/p\u003e\n\n[![Documentation](https://img.shields.io/badge/docs-master-blue)](https://realaravinth.github.io/cache-buster/cache_buster/index.html)\n![CI (Linux)](\u003chttps://github.com/realaravinth/cache-buster/workflows/CI%20(Linux)/badge.svg\u003e)\n[![dependency status](https://deps.rs/repo/github/realaravinth/cache-buster/status.svg)](https://deps.rs/repo/github/realaravinth/cache-buster)\n\u003cbr /\u003e\n[![codecov](https://codecov.io/gh/realaravinth/cache-buster/branch/master/graph/badge.svg)](https://codecov.io/gh/realaravinth/cache-buster)\n\n\u003c/div\u003e\n\n## What is cache busting?\n\nTo optimise network load time, browsers cache static files. Caching\ngreatly improves performance but how do you inform browsers to\ninvalidate cache when your files have changed?\n\nCache busting is a simple but effective solution for this issue. There\nare several ways to achieve this but the way this library does this is\nby changing file names to include the hash of the files' contents.\n\nSo if you have `bundle.js`, it will become\n`bundle.\u003clong-sha256-hash\u003e.js`. This lets you set a super long cache age\nas, because of the file names changing, the path to the filename, too,\nwill change. So as far as the browser is concerned, you are trying to load\na file that it doesn't have. Pretty neat, isn't it?\n\n## Features\n\n-   [x] `SHA-256` based name generation during compile-time\n-   [x] Processes files based on provided MIME filters\n-   [x] Exclude certain files from processing based on file extensions\n        and/or file paths\n-   [x] Exposes modified names to program during runtime\n-   [x] Route prefixes(optional)\n\n## Usage:\n\nAdd this to your `Cargo.toml`:\n\n```toml\ncache-buster = { version = \"0.2\", git = \"https://github.com/realaravinth/cache-buster\" }\n```\n\n## Examples:\n\n-   See [acix-example](./examples/actix-web)\n-   See [mCaptcha/mcaptcha](https://github.com/mCaptcha/mcaptcha) for use\n    with [Sailfish](https://crates.io/crates/sailfish) template engine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealaravinth%2Fcache-buster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealaravinth%2Fcache-buster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealaravinth%2Fcache-buster/lists"}