instance method flush_cache

Ruby on Rails 3.1.12

Since v2.3.18 Last seen in v3.2.22.5

Available in: v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

flush_cache(*syms)

No documentation comment.

Parameters

syms rest
Source
# File activesupport/lib/active_support/memoizable.rb, line 47
      def flush_cache(*syms)
        syms.each do |sym|
          (methods + private_methods + protected_methods).each do |m|
            if m.to_s =~ /^_unmemoized_(#{sym.to_s.gsub(/\?\Z/, '\?')})/
              ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
              instance_variable_get(ivar).clear if instance_variable_defined?(ivar)
            end
          end
        end
      end

Defined in activesupport/lib/active_support/memoizable.rb line 47 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Memoizable::InstanceMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close