Method: Mongoid::UnitOfWork#using_identity_map?

Defined in:
lib/mongoid/unit_of_work.rb

#using_identity_map?true, false

Are we currently using the identity map?

Examples:

Is the identity map currently enabled?

Mongoid.using_identity_map?

Returns:

  • (true, false)

    If the identity map is in use.

Since:

  • 3.0.0



57
58
59
# File 'lib/mongoid/unit_of_work.rb', line 57

def using_identity_map?
  Mongoid.identity_map_enabled? && Threaded.identity_map_enabled?
end