Rails.cache.write returns false with MemCacheStore even if the operation
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/tree/master/activesupport/lib/active_support/cache/mem_cache_store.rb#L41

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 (1.5.0) bundled
http://github.com/rails/rails/tree/master/activesupport/lib/active_support/vendor/memcache-client-1.5.0/memcache.rb#L322


I created a ticket and attached a patch to it
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1239-railscachewrite-returns-false-with-memcachestore


Best,
Luca
-- 
blog: www.lucaguidi.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to