Class VideoSweeper
In: app/sweepers/video_sweeper.rb
Parent: ActionController::Caching::Sweeper

Methods

Public Class methods

[Source]

    # File app/sweepers/video_sweeper.rb, line 19
19:   def self.sweep
20:     Video::LANGUAGES.each do |lang|
21:       FileUtils.rm(ActionController::Base.page_cache_directory+"/#{lang}/podcast.xml") if File.exists?(ActionController::Base.page_cache_directory+"/#{lang}/podcast.xml")
22:     end
23:   end

Public Instance methods

If our sweeper detects that a Video was created call this

[Source]

   # File app/sweepers/video_sweeper.rb, line 5
5:   def after_create(video)  
6:     expire_cache_for(video)  
7:   end

If our sweeper detects that a Video was deleted call this

[Source]

    # File app/sweepers/video_sweeper.rb, line 15
15:   def after_destroy(video)  
16:     expire_cache_for(video)  
17:   end

If our sweeper detects that a Video was updated call this

[Source]

    # File app/sweepers/video_sweeper.rb, line 10
10:   def after_update(video)  
11:     expire_cache_for(video)  
12:   end

[Validate]