def process_cmd(cmd, search_data, login, password, cache)
      if cmd == 'skel'
        generate_skeleton
        return
      end

      cache.clear! if cmd == 'reload'

      if %w(reload, update).include?(cmd) || cache.stale?
        update_cache(cache, login, password)
      end

      search(cache, search_data) if cmd == 'search'
    end
def process_cmd(cmd, search_data, login, password, cache)
      if cmd == 'skel'
        generate_skeleton
        return
      end

      cache.clear! if cmd == 'reload'

      if %w(reload, update).include?(cmd) || cache.stale?
        update_cache(cache, login, password)
      end

      search(cache, search_data) if cmd == 'search'
    end
Process a command passed on the command line.
 @param cmd [String] The command requested.
 @param search_data [String] Data to search for from cmd line.
 @param login [String] GMail login.
 @param password [String] GMail password.
 @param cache  [ContactsCache] Cache of contacts.

 @return [nil]