Module: TinyCache::ActiveRecord::Persistence

Extended by:
ActiveSupport::Concern
Defined in:
lib/tiny_cache/active_record/persistence.rb

Instance Method Summary collapse

Instance Method Details

#reload_with_tiny_cache(options = nil) ⇒ Object



19
20
21
# File 'lib/tiny_cache/active_record/persistence.rb', line 19

def reload_with_tiny_cache(options = nil)
  reload_without_tiny_cache(options).tap{expire_tiny_cache}
end

#touch_with_tiny_cache(name = nil) ⇒ Object



23
24
25
# File 'lib/tiny_cache/active_record/persistence.rb', line 23

def touch_with_tiny_cache(name = nil)
  touch_without_tiny_cache(name).tap{update_tiny_cache}
end

#update_column_with_tiny_cache(name, value) ⇒ Object



15
16
17
# File 'lib/tiny_cache/active_record/persistence.rb', line 15

def update_column_with_tiny_cache(name, value)
  update_column_without_tiny_cache(name, value).tap{update_tiny_cache}
end