instance method cached_attributes

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v4.1.16

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16

Signature

cached_attributes()

Returns the attributes which are cached. By default time related columns with datatype :datetime, :timestamp, :time, :date are cached.

Source
# File activerecord/lib/active_record/attribute_methods/read.rb, line 23
        def cached_attributes
          @cached_attributes ||= columns.select { |c| cacheable_column?(c) }.map { |col| col.name }.to_set
        end

Defined in activerecord/lib/active_record/attribute_methods/read.rb line 23 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::AttributeMethods::Read::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close