06chaynes / http-cache

A caching middleware that follows HTTP caching rules
https://http-cache.rs/
Apache License 2.0
69 stars 17 forks source link

Use http-1.0.0 for http-cache-tower #70

Open SebRollen opened 10 months ago

SebRollen commented 10 months ago

WIP branch for updating the refactor branch to use http-1.0.0, per our discussion in https://github.com/06chaynes/http-cache/issues/4.

If accepting the Clone bound on ReqBody is acceptable, it simplifies the passing of the request to the future quite a lot.

If this looks promising to you, I can also try to tackle updating the future into a state-machine so that we can poll other futures inside of it. I know the refactor branch is quite far behind the main branch though, so if it makes more sense to work off of that one, let me know. I might need some pointers in terms of which methods need to be called inside the future since I'm not too familiar with http-cache internals.

06chaynes commented 10 months ago

Pushed a new branch that I think might ease this implementation a bit, at least I think it might in regards to running the async code blocks https://github.com/06chaynes/http-cache/tree/remove-async-trait

06chaynes commented 10 months ago

One prerequisite to merging this will be the Reqwest update to use hyper v1.0.0, which thankfully seems to be underway here https://github.com/seanmonstar/reqwest/tree/hyper-v1

After updating in my local branch everything but the http-cache-reqwest crate seems to be good to go, so once Reqwest itself is updated it should be fairly straightforward to complete on this end.

06chaynes commented 8 months ago

Sweet, reqwest has been updated. Just need a new reqwest-middleware release and this particular change should be about ready

NOBLES5E commented 5 months ago

@06chaynes It seems that reqwest-middleware has been released

06chaynes commented 5 months ago

@06chaynes It seems that reqwest-middleware has been released

That comment was in regards to updating http, which has already been merged in