270
271
272
273
274
275
276
277
278
279
280
281
282
|
# File 'lib/record_cache/datastore/active_record_30.rb', line 270
def update_all_with_record_cache(updates, conditions = nil, options = {})
result = update_all_without_record_cache(updates, conditions, options)
if record_cache?
unless conditions || options.present? || @limit_value.present? != @order_values.present?
connection.execute(select('id').to_sql).each{ |row| record_cache.invalidate(:id, (row.is_a?(Hash) ? row['id'] : row.first).to_i ) }
end
end
result
end
|