Methods
#
C
D
E
K
L
N
Class Public methods
new(connection, max = 1000)
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 95
def initialize(connection, max = 1000)
  super
  @cache = Hash.new { |h,pid| h[pid] = {} }
end
Instance Public methods
[](key)
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 102
def [](key);      cache[key]; end
[]=(sql, key)
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 106
def []=(sql, key)
  while @max <= cache.size
    cache.shift.last[:stmt].close
  end
  cache[sql] = key
end
clear()
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 113
def clear
  cache.values.each do |hash|
    hash[:stmt].close
  end
  cache.clear
end
delete(key)
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 104
def delete(key);  cache.delete(key); end
each(&block)
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 100
def each(&block); cache.each(&block); end
key?(key)
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 101
def key?(key);    cache.key?(key); end
length()
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 103
def length;       cache.length; end