docbrown/app/services/edge_cache/bust_commentable.rb
Alex 7ee8523ba3
Refactor EdgeCache (#11684)
* Refactor EdgeCache

* Update specs

* Add bust comment spec

* Fix more specs

* Use const_get

* Make methods private

* Add .discussion? decorator to Article

* Change variable name to article for clarity
2020-12-02 14:20:22 -05:00

11 lines
268 B
Ruby

module EdgeCache
class BustCommentable < Bust
def self.call(commentable)
return unless commentable
EdgeCache::BustComment.call(commentable)
bust("#{commentable.path}/comments")
commentable.index_to_elasticsearch_inline
end
end
end