module ActiveRecord::QueryLogs

def comment(connection)

Sets and returns a cached comment if cache_query_log_tags is +true+.
Returns an SQL comment +String+ containing the query log tags.
def comment(connection)
  if cache_query_log_tags
    self.cached_comment ||= uncached_comment(connection)
  else
    uncached_comment(connection)
  end
end