This project is archived and is in readonly mode.
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')
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
memcached-client bundled
http://github.com/rails/rails/tr...
I wrote and attached a patch to force using bundled gem to solve this issue.
Comments and changes to this ticket
-
Luca Guidi October 20th, 2008 @ 05:57 PM
- no changes were found...
-
Michael Koziarski October 21st, 2008 @ 09:12 AM
- 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?
-
Luca Guidi November 3rd, 2008 @ 09:14 AM
I attached another patch. It increments the version of bundled gem: the original one will be shadowed and not required.
-
Repository November 6th, 2008 @ 08:01 PM
- 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...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1239 Rails.cache.write returns false with MemCacheStore The changes will be submitted upstream. Signed-off-by: Mi...