libcachebust/README.md

34 lines
1.2 KiB
Markdown
Raw Normal View History

2021-04-08 19:38:26 +05:30
<div align="center">
2021-04-10 18:05:31 +05:30
<h1>Cache Buster</h1>
2021-04-08 19:38:26 +05:30
<p>
<strong>cache-buster - A library that aids in staticfile cache busting with SHA-258 hashes</strong>
</p>
[![Documentation](https://img.shields.io/badge/docs-master-blue)](https://realaravinth.github.io/cache-buster/cache_buster/index.html)
![CI (Linux)](<https://github.com/realaravinth/cache-buster/workflows/CI%20(Linux)/badge.svg>)
[![dependency status](https://deps.rs/repo/github/realaravinth/cache-buster/status.svg)](https://deps.rs/repo/github/realaravinth/cache-buster)
<br />
[![codecov](https://codecov.io/gh/realaravinth/cache-buster/branch/master/graph/badge.svg)](https://codecov.io/gh/realaravinth/cache-buster)
</div>
## Features
- [x] `SHA-256` based name generation during compile-time
- [x] Processes files based on provided MIME filters
2021-04-08 22:11:26 +05:30
- [x] Exposes modified names to program during runtime
2021-04-08 19:38:26 +05:30
## Usage:
Add this to your `Cargo.toml`:
```toml
2021-04-08 22:11:26 +05:30
cache-buster = { version = "0.1", git = "https://github.com/realaravinth/cache-buster" }
2021-04-08 19:38:26 +05:30
```
## Examples:
2021-04-10 18:05:31 +05:30
- See [acix-example](./actix-example)
- See [mCaptcha/guard](https://github.com/mCaptcha/guard) for use
with [Sailfish](https://crates.io/crates/sailfish) template engine.