inlyne icon indicating copy to clipboard operation
inlyne copied to clipboard

Add a persistent image cache

Open CosmicHorrorDev opened this issue 2 years ago • 5 comments

This will eventually resolve #234

CosmicHorrorDev avatar Mar 30 '24 19:03 CosmicHorrorDev

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 much async is a requirement there (http-cache)
  • There's some interop required to get the right info out of ureq but that's not the worst
  • The DB format is a bit more static with redb than 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

CosmicHorrorDev avatar Apr 13 '24 21:04 CosmicHorrorDev

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:

CosmicHorrorDev avatar Jun 08 '24 20:06 CosmicHorrorDev

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

CosmicHorrorDev avatar Jun 10 '24 04:06 CosmicHorrorDev