Class: PictureSweeper

Inherits:
ActionController::Caching::Sweeper
  • Object
show all
Includes:
PageCache
Defined in:
app/sweepers/picture_sweeper.rb

Instance Method Summary collapse

Methods included from PageCache

#delete_cache_pagination_galleries, #delete_cache_pagination_pictures, #delete_cache_pagination_tag, #expire_cache_galleries, #expire_cache_pictures, #expire_cache_tags, #expire_root, sweep_all

Instance Method Details

#after_create(picture) ⇒ Object



8
9
10
# File 'app/sweepers/picture_sweeper.rb', line 8

def after_create(picture)
  expire_cache(picture)
end

#after_destroy(picture) ⇒ Object



16
17
18
# File 'app/sweepers/picture_sweeper.rb', line 16

def after_destroy(picture)
  expire_cache(picture)
end

#after_update(picture) ⇒ Object



12
13
14
# File 'app/sweepers/picture_sweeper.rb', line 12

def after_update(picture)
  expire_cache(picture)
end