Sha256: d0e29d9054867017c9ada3d51117193a9ec14c18dbacdcaaffddd466d2d2a696

Contents?: true

Size: 1.53 KB

Versions: 7

Compression:

Stored size: 1.53 KB

Contents

= Memcache-client FAQ

== Does memcache-client work with Ruby 1.9?

Yes, Ruby 1.9 is supported.  The test suite should pass completely on 1.8.6 and 1.9.1.


== I'm seeing "execution expired" or "time's up!" errors, what's that all about?

memcache-client 1.6.x+ now has socket operations timed out by default.  This is to prevent
the Ruby process from hanging if memcached or starling get into a bad state, which has been
seen in production by both 37signals and FiveRuns.  The default timeout is 0.5 seconds, which
should be more than enough time under normal circumstances.  It's possible to hit a storm of
concurrent events which cause this timer to expire: a large Ruby VM can cause the GC to take
a while, while also storing a large (500k-1MB value), for example.

You can increase the timeout or disable them completely with the following configuration:

  Rails:
  config.cache_store = :mem_cache_store, 'server1', 'server2', { :timeout => nil } # no timeout

  native:
  MemCache.new ['server1', 'server2'], { :timeout => 1.0 } # 1 second timeout


== Isn't Evan Weaver's memcached gem faster?

The latest version of memcached-client is anywhere from 33% to 100% slower than memcached in various
benchmarks.  Keep in mind this means that 10,000 get requests take 1.8 sec instead of 1.2 seconds.
In practice, memcache-client is unlikely to be a bottleneck in your system but there is always going
to be an overhead to pure Ruby.  memcache-client does have the advantage of built-in integration into
Rails and should work on non-MRI platforms: JRuby, MacRuby, etc.

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
jjp-memcache-client-1.8.7 FAQ.rdoc
memcache-client-1.8.5 FAQ.rdoc
memcache-client-1.8.4 FAQ.rdoc
memcache-client-1.8.3 FAQ.rdoc
memcache-client-1.8.2 FAQ.rdoc
memcache-client-1.8.1 FAQ.rdoc
memcache-client-1.8.0 FAQ.rdoc