Module: ArCache::ActiveRecord::ConnectionAdapters::NullTransaction

Included in:
Transaction
Defined in:
lib/ar_cache/active_record/connection_adapters/abstract/transaction.rb

Instance Method Summary collapse

Instance Method Details

#delete_ar_cache_primary_keys(keys, table) ⇒ Object



7
8
9
# File 'lib/ar_cache/active_record/connection_adapters/abstract/transaction.rb', line 7

def delete_ar_cache_primary_keys(keys, table)
  handle_ar_cache_primary_keys(keys) unless table.disabled?
end

#handle_ar_cache_primary_keys(keys) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/ar_cache/active_record/connection_adapters/abstract/transaction.rb', line 15

def handle_ar_cache_primary_keys(keys)
  if ArCache::Configuration.cache_lock?
    keys.each { |k| ArCache.lock_key(k) }
  else
    ArCache.delete_multi(keys)
  end
end

#update_ar_cache_table(table) ⇒ Object



11
12
13
# File 'lib/ar_cache/active_record/connection_adapters/abstract/transaction.rb', line 11

def update_ar_cache_table(table)
  table.update_cache
end