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

22 lines
456 B
Ruby

module EdgeCache
class BustUser < Bust
def self.call(user)
return unless user
username = user.username
paths = [
"/#{username}",
"/#{username}?i=i",
"/#{username}/comments",
"/#{username}/comments?i=i",
"/#{username}/comments/?i=i",
"/live/#{username}",
"/live/#{username}?i=i",
"/feed/#{username}",
]
paths.each { |path| bust(path) }
end
end
end