module Mongoid::Cacheable

def cache_key

Returns:
  • (String) - the string with or without updated_at

Other tags:
    Example: Returns the cache key -
def cache_key
  return "#{model_key}/new" if new_record?
  return "#{model_key}/#{_id}-#{updated_at.utc.to_formatted_s(cache_timestamp_format)}" if do_or_do_not(:updated_at)
  "#{model_key}/#{_id}"
end