While that's true, Dalli handles this internally by truncating and using
MD5 (I think it's MD5 at least). `#cache_key` is preferable because it is
more unique.

Also take a look at this in terms of using CRC32:
http://stackoverflow.com/questions/14210298/probability-of-collision-crc32

It's fine for a ruby Hash since hash equivalence is not enough for a match,
but for memcached type caching where it's purely key equivalence, that's
pretty terrible. Even just 30k cached URLs would result in a 10%(!) chance
of collision.


On Fri, Dec 27, 2013 at 3:54 PM, Hans Hasselberg
<notifications@github.com>wrote:

> In README.md:
>
> >  #=> true
> >  ```
> >
> > +For use with [Dalli](https://github.com/mperham/dalli):
> > +
> > +```ruby
> > +class Cache
> > +  def initialize
> > +    @client = Dalli::Client.new
> > +  end
> > +
> > +  def get(request)
> > +    @client.get(request.cache_key)
>
> Why would you use cache_key instead of hash? cache_key can be arbitrarily
> long and nasty. Think unicode :).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/typhoeus/typhoeus/pull/345/files#r8572583>
> .
>