def find_in_static_record_cache(finder, attributes)#:nodoc:
      list = static_record_cache[:primary_key].values.inject([]) do |list, record|
        unless attributes.select{|k,v| record.send(k).to_s != v.to_s}.any?
          return record if finder == :first
          list << record
        end
        list
      end
      finder == :all ? list : list.last
    end
def find_in_static_record_cache(finder, attributes)#:nodoc:
      list = static_record_cache[:primary_key].values.inject([]) do |list, record|
        unless attributes.select{|k,v| record.send(k).to_s != v.to_s}.any?
          return record if finder == :first
          list << record
        end
        list
      end
      finder == :all ? list : list.last
    end
Search the cache for records with the specified attributes

 * +finder+ - Same as with +find+ specify <tt>:all</tt>, <tt>:last</tt> or <tt>:first</tt>
   <tt>:all</all> returns an array of active records, <tt>:last</tt> or <tt>:first</tt> returns a single instance
 * +attributes+ - a hash map of fields (or methods) => values

   User.find_in_static_cache(:first, {:password => 'fun', :user_name => 'giraffe'})