Skip to content
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

Make caching easier for non-memory caches. #345

Merged
merged 2 commits into from
Dec 27, 2013

Conversation

mschulkind
Copy link
Contributor

I'd say you should probably still get rid of the Zlib usage and just call String#hash, but that's up to you, and I left it untouched in this PR. Caching as per the new instructions doesn't depend on Request#hash being consistent anymore, and nobody should have been expecting that behavior in the past either.

Typhoeus.get("www.example.com") == Typhoeus.get("www.example.com")
Typhoeus.get("www.example.com").cached?
#=> false
Typhoeus.get("www.example.com").cached?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. In addition to pointing out #cached?, I changed it because it's not actually true for non-memory cachers that serialize and then deserialize the response object.

hanshasselberg added a commit that referenced this pull request Dec 27, 2013
Make caching easier for non-memory caches.
@hanshasselberg hanshasselberg merged commit 72f3746 into typhoeus:master Dec 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants