cache_control 0.2.0

Rust crate to parse the HTTP Cache-Control header.
Documentation
1
2
3
4
5
6
7
8
9
10
11
# rust-cache-control
Rust crate to parse the HTTP Cache-Control header.

```rust
use cache_control::{Cachability, CacheControl};
use std::time::Duration;

let cache_control = CacheControl::from_header("Cache-Control: public, max-age=60").unwrap();
assert_eq!(cache_control.cachability, Some(Cachability::Public));
assert_eq!(cache_control.max_age, Some(Duration::from_secs(60)));
```