def add(url, code = nil, options = nil)
      return if @read_only
      if existing_code = code_for(url)
        existing_code
      else
        code = get_code(url, code, options)

        if existing_url = find(code)
          raise DuplicateCodeError.new(existing_url, url, code) if url != existing_url
        end
        @cassandra.insert("codes", code, 'url' => url)
        @cassandra.insert("urls", url, 'code' => code)
        code
      end
    end
def add(url, code = nil, options = nil)
      return if @read_only
      if existing_code = code_for(url)
        existing_code
      else
        code = get_code(url, code, options)

        if existing_url = find(code)
          raise DuplicateCodeError.new(existing_url, url, code) if url != existing_url
        end
        @cassandra.insert("codes", code, 'url' => url)
        @cassandra.insert("urls", url, 'code' => code)
        code
      end
    end
Public: Initialise the adapter with a Redis instance.

 cassandra - A Cassandra instance to persist urls and codes to.
 Public: Stores the shortened version of a URL.

 url     - The String URL to shorten and store.
 code    - Optional String code for the URL.
 options - Optional Guillotine::Service::Options

 Returns the unique String code for the URL.  If the URL is added
 multiple times, this should return the same code.