Sha256: 8bbcc14cf4180a0b6763fd4121213f630934be5c1e3ef521d162f4f65b8646b9

Contents?: true

Size: 297 Bytes

Versions: 5

Compression:

Stored size: 297 Bytes

Contents

class StructureSweeper < ActionController::Caching::Sweeper
	observe Structure
	
	def after_create(item)
		expire(item)
	end
	
	def after_update(item)
		expire(item)
	end
	
	def after_destroy(item)
		expire(item)
	end
	
	private
	
	  def expire(item=nil)
		  Sunrise::Utils.clear_cache
	  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sunrise-core-0.2.2 app/sweepers/structure_sweeper.rb
sunrise-core-0.2.1 app/sweepers/structure_sweeper.rb
sunrise-core-0.2.0 app/sweepers/structure_sweeper.rb
sunrise-core-0.1.5 app/sweepers/structure_sweeper.rb
sunrise-core-0.1.4 app/sweepers/structure_sweeper.rb