instance method
append
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
append(key, value)
Append - ‘add this data to an existing key after existing data’ Please note the value is always passed to memcached as raw since it doesn’t make a lot of sense to concatenate marshalled data together.
Parameters
-
keyreq -
valuereq
Source
# File activesupport/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb, line 435
def append(key, value)
raise MemCacheError, "Update of readonly cache" if @readonly
with_server(key) do |server, cache_key|
logger.debug { "append #{key} to #{server}: #{value ? value.to_s.size : 'nil'}" } if logger
command = "append #{cache_key} 0 0 #{value.to_s.size}#{noreply}\r\n#{value}\r\n"
with_socket_management(server) do |socket|
socket.write command
break nil if @no_reply
result = socket.gets
raise_on_error_response! result
result
end
end
end
Defined in activesupport/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb line 435
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in MemCache