def get(uid, ref = nil)
      # First check if it's a modified object.
      if (object = @modified_entries[uid])
        return object
      end

      # Then check the unmodified object list.
      if (object = @unmodified_entries[uid % @size]) && object.uid == uid
        return object
      end

      # If we don't have it in memory we need to load it.
      @klass::load(@collection, uid, ref)
    end
def get(uid, ref = nil)
      # First check if it's a modified object.
      if (object = @modified_entries[uid])
        return object
      end

      # Then check the unmodified object list.
      if (object = @unmodified_entries[uid % @size]) && object.uid == uid
        return object
      end

      # If we don't have it in memory we need to load it.
      @klass::load(@collection, uid, ref)
    end
Retrieve a object reference from the cache.
 @param uid [Integer] uid of the object to retrieve.
 @param ref [Object] optional reference to be used by the load method