-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support of unchanged requests #433
base: master
Are you sure you want to change the base?
Conversation
Thanks @kvokka - any reason for writing this rather than using the https://github.com/plataformatec/faraday-http-cache gem? Also, I wonder if you can fix up the failing tests? |
Thank you for so quick response. gem https://github.com/plataformatec/faraday-http-cache is great, but it targets to client-side optimizing, rather this middleware is targeting to back-end. This chink was made to prevent heavy response generation on other side, in favor checking Travis is green now :) I've fix syntax to the most common style for Ruby 1.9.3 support. Strange to see 1.9.3 in 2017 |
Added middleware for correct support status 304 in responses It gives huge speed boost, if you have to request same resources offten
In Caching part of the README shown way, how to implement caching, but, if on other side object will be changed there is no way to get this information. Only Of course it is not perfect solution, but it is much more livable, than that, which is included in README. If you like the code, I can do README update also (or you may take comments from the middleware) |
@kvokka a quick holding message to say I haven't forgotten about this! Just want to find some time to review properly. |
@zacharywelch if you're feeling keen could you review this? |
Hi @kvokka, thanks for the PR! Do you mind putting together some specs describing the middleware behavior? See first_level_parse_json_spec for an example. I'm also curious what the difference would be with something like Another idea discussed in #445 would be to package your own faraday middleware if it's something that could be used by other faraday consumers. Generally her middleware is fundamental to the ORM. |
Added middleware for correct support status 304 in responses
It gives huge speed boost, if you have to
request same resources offten