Sha256: c2a1246d9b3e7c1125cf7220de77c113cfdabe701b4a098b992fece6d14e97ac

Contents?: true

Size: 262 Bytes

Versions: 21

Compression:

Stored size: 262 Bytes

Contents

module Superstore
  module Caching
    extend ActiveSupport::Concern

    def cache_key
      if new_record?
        "#{self.class.model_name.cache_key}/new"
      else
        "#{self.class.model_name.cache_key}/#{id}-#{updated_at}"
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
superstore-1.0.3 lib/superstore/caching.rb