inlyne
inlyne copied to clipboard
Add a persistent image cache
This will eventually resolve #234
Just some random tidbits:
- Useful looking crate for handling HTTP cache semantics (
http-cache-semantics). Potentially this crate as a higher level one depending on how muchasyncis a requirement there (http-cache) - There's some interop required to get the right info out of
ureqbut that's not the worst - The DB format is a bit more static with
redbthan it would be with some SQL DB that can be changed with migrations. I think we can have some consistent header with the internal version and TTL so that we can mix-n-match versions a bit as long as the table layout doesn't change
thread 'image::cache::tests::layers' panicked at src/image/cache/tests.rs:306:66:
called `Result::unwrap()` on an `Err` value: Failed creating database
Caused by:
Database already open. Cannot acquire lock.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
image::cache::tests::layers
Guess who has two thumbs and gets to port things away from redb? :+1::disappointed::+1:
Still a little ways to go, but getting closer at least :tada:
running 1 test
test image::cache::tests::layers ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 52 filtered out; finished in 0.03s