Method: Mongoid::Threaded#identity_map

Defined in:
lib/mongoid/threaded.rb

#identity_mapIdentityMap

Get the identity map off the current thread.

Examples:

Get the identity map.

Threaded.identity_map

Returns:

Since:

  • 2.1.0



176
177
178
# File 'lib/mongoid/threaded.rb', line 176

def identity_map
  Thread.current["[mongoid]:identity-map"] ||= IdentityMap.new
end