module ArCache::ActiveRecord::Persistence::ClassMethods

Public Instance Methods

_delete_record(constraints) click to toggle source
Calls superclass method
# File lib/ar_cache/active_record/persistence.rb, line 14
def _delete_record(constraints)
  ArCache.skip_expire do
    delete_ar_cache_key(constraints[@primary_key])
    super
  end
end
_update_record(_, constraints) click to toggle source
Calls superclass method
# File lib/ar_cache/active_record/persistence.rb, line 7
def _update_record(_, constraints)
  ArCache.skip_expire do
    delete_ar_cache_key(constraints[@primary_key])
    super
  end
end

Private Instance Methods

delete_ar_cache_key(id) click to toggle source
# File lib/ar_cache/active_record/persistence.rb, line 21
        def delete_ar_cache_key(id)
  key = ar_cache_table.primary_cache_key(id)
  connection.current_transaction.delete_ar_cache_primary_keys([key], ar_cache_table)
end