This project is archived and is in readonly mode.

#1239 ✓committed
Luca Guidi

Rails.cache.write returns false with MemCacheStore

Reported by Luca Guidi | October 20th, 2008 @ 05:51 PM | in 2.x

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

result = Rails.cache.write('key', 'value')'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.

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

memcached-client bundled

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

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by