app/controllers/doc_sweeper.rb
def after_destroy(doc)
		expire_fragment('count_docs')
		expire_fragment("count_#{doc.sourcedb}")
		doc.projects.each do |p|
			expire_fragment("count_docs_#{p.name}")
			expire_fragment("count_#{doc.sourcedb}_#{p.name}")
		end
	end
# If our sweeper detects that a doc was deleted call this
If our sweeper detects that a doc was deleted call this
If our sweeper detects that a doc was deleted call this
def after_destroy(doc)
		expire_fragment('count_docs')
		expire_fragment("count_#{doc.sourcedb}")
		doc.projects.each do |p|
			expire_fragment("count_docs_#{p.name}")
			expire_fragment("count_#{doc.sourcedb}_#{p.name}")
		end
	end
def after_destroy ( doc ) expire_fragment ( 'count_docs' ) expire_fragment ( "count_#{doc.sourcedb}" ) doc . projects . each do | p | expire_fragment ( "count_docs_#{p.name}" ) expire_fragment ( "count_#{doc.sourcedb}_#{p.name}" ) end end
If our sweeper detects that a doc was deleted call this
If our sweeper detects that a doc was deleted call this
doc