Corrected the example: use .some instead of .indexOf to find the cached object.