Method: StandardModel#clear_cache

Defined in:
lib/app/models/concerns/standard_model.rb

#clear_cacheObject

Clear the cache



196
197
198
199
200
201
202
203
204
# File 'lib/app/models/concerns/standard_model.rb', line 196

def clear_cache
  Rails.cache.delete_matched "*#{id}*"
  return unless respond_to?(:account) && .present? && .is_a?()

  Rails.cache.delete_matched "*#{account.id}*"
  true # Force a return of true so that we don't break the callback chain.
rescue StandardError
  true
end