Class: ThreadSweeper
- Inherits:
-
ActionController::Caching::Sweeper
- Object
- ActionController::Caching::Sweeper
- ThreadSweeper
- Defined in:
- app/models/thread_sweeper.rb
Instance Method Summary collapse
- #after_create(thread_read) ⇒ Object
- #after_destroy(thread_read) ⇒ Object
- #after_save(thread_read) ⇒ Object
Instance Method Details
#after_create(thread_read) ⇒ Object
8 9 10 |
# File 'app/models/thread_sweeper.rb', line 8 def after_create(thread_read) expire_cache_for(thread_read) end |
#after_destroy(thread_read) ⇒ Object
12 13 14 |
# File 'app/models/thread_sweeper.rb', line 12 def after_destroy(thread_read) expire_cache_for(thread_read) end |
#after_save(thread_read) ⇒ Object
4 5 6 |
# File 'app/models/thread_sweeper.rb', line 4 def after_save(thread_read) expire_cache_for(thread_read) if thread_read.read_changed? end |