docbrown/app/services/edge_cache/bust_organization.rb
Alex 494359fd21
Create services for busting organizations, podcast episodes, listings, and users (#11832)
* Create service for bust_organization

* Create bust_podcast_episode_service

* Add error spec to BustOrganization

* Create bust_listings

* Create bust_user service
2020-12-11 08:59:24 -05:00

17 lines
365 B
Ruby

module EdgeCache
class BustOrganization < Bust
def self.call(organization, slug)
return unless organization && slug
bust("/#{slug}")
begin
organization.articles.find_each do |article|
bust(article.path)
end
rescue StandardError => e
Rails.logger.error("Tag issue: #{e}")
end
end
end
end