instance method cached?

Ruby on Rails 8.0.4

Since v7.1.6

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

cached?(table_name)

No documentation comment.

Parameters

table_name req
Source
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 79
      def cached?(table_name)
        if @cache.nil?
          # If `check_schema_cache_dump_version` is enabled we can't load
          # the schema cache dump without connecting to the database.
          unless self.class.check_schema_cache_dump_version
            @cache = load_cache(nil)
          end
        end

        @cache&.cached?(table_name)
      end

Defined in activerecord/lib/active_record/connection_adapters/schema_cache.rb line 79 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::SchemaReflection

Type at least 2 characters to search.

↑↓ navigate · open · esc close