# File lib/memcache/server.rb, line 138
    def replace(key, value, expiry = 0, flags = 0)
      response = write_command("replace #{cache_key(key)} #{flags.to_i} #{expiry.to_i} #{value.to_s.size}", value)
      response == "STORED\r\n" ? value : nil
    end