arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 125 forks source link

Add support for Memcached::Rails write option :unless_exist #127

Closed joe1chen closed 11 years ago

joe1chen commented 11 years ago

Fix Memcached::Rails write method to match ActiveSupport memcache write behavior:

1) Support :unless_exist option (don't write value if key already exists). 2) Convert values to string if :raw is true. This allows values like Fixnum's to be passed into write.