Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails.cache.write returns false with MemCacheStore

#1239

Rails.cache.write returns false with MemCacheStore even if the operation has was successful done.


result = Rails.cache.write('key', 'value')
Rails.cache.read('key') # => value
puts result # => false

The problem is trivial: MemCache#set doesn't return any result, so the check performed by MemCacheStore#write will always fail. http://github.com/rails/rails/tr...

The described behavior is related to memcache-client (1.5.0). I noticed differences between the gem installed on my machine and the bundled one:

memcached-client (1.5.0) gem

http://pastie.org/296380

memcached-client bundled

http://github.com/rails/rails/tr...

I wrote and attached a patch to force using bundled gem to solve this issue.

Reported by Luca Guidi · October 20th, 2008 @ 05:51 PM

State: committed
Milestone: 2.x
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. Luca Guidi
  2. Michael Koziarski
    Michael Koziarski
    • Assigned user set to Jeremy Kemper

    The correct fix here would be to get our changes to memcache-client merged upstream.

    Jeremy, are they in a patch somewhere?

    October 21st, 2008 @ 09:12 AM

  3. Luca Guidi
    Luca Guidi

    I attached another patch. It increments the version of bundled gem: the original one will be shadowed and not required.

    November 3rd, 2008 @ 09:14 AM

  4. Repository
    Repository
    • State changed from new to committed

    (from [4ccbc5dffb980edf35be899889f9e227dbd426c7]) Increment the version of our modified memcache_client code to prevent users with the gem installed not seeing our changes.

    The changes will be submitted upstream. Signed-off-by: Michael Koziarski michael@koziarski.com [#1239 state:committed] http://github.com/rails/rails/co...

    November 6th, 2008 @ 08:01 PM