aoc-cache
A way of caching your input from the great and popular Advent of Code.
This is an attempt to reduce server load for the creator.
Downloads using ureq, stores cache in temporary files using
scratch.
Since we use scratch, a cargo clean will remove the cache and cause new downloads for new runs.
Example
use get;
// my.cookie is a file containing the cookie string.
const MY_COOKIE: &str = include_str!;
let input: = // Grabs from web if
get;
let input: = // Grabs from cache
get;
Warning If you use source control for your AoC solutions, take care to not check in any files that contain your cookie into source control!
Example
.gitignore:**/target/ my.cookie