docbrown/app/services/edge_cache/bust_podcast_episode.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

18 lines
402 B
Ruby

module EdgeCache
class BustPodcastEpisode < Bust
def self.call(podcast_episode, path, podcast_slug)
return unless podcast_episode && path && podcast_slug
podcast_episode.purge
podcast_episode.purge_all
begin
bust(path)
bust("/#{podcast_slug}")
bust("/pod")
rescue StandardError => e
Rails.logger.warn(e)
end
end
end
end