module AdequateSerialization::CacheRefresh

Public Class Methods

extended(base) click to toggle source
# File lib/adequate_serialization/rails/cache_refresh.rb, line 46
def self.extended(base)
  base.after_update_commit { CacheRefreshJob.perform_later(self) }
end

Public Instance Methods

associate_cache(association) click to toggle source
# File lib/adequate_serialization/rails/cache_refresh.rb, line 50
def associate_cache(association)
  associated_caches << association
end
associated_caches() click to toggle source

The associations that serialize this object in their responses, so that we know to bust their cache when this object is updated.

# File lib/adequate_serialization/rails/cache_refresh.rb, line 56
def associated_caches
  @associated_caches ||= []
end