This paper deals with the trapping of a particle diffusing in a cylindrical cavity by two circular absorbing spots of arbitrary radii located in the centers of the cavity bases. The focus is on the mean particle lifetime, which is its mean first-passage time to one of the spots. When the spots are small and their radii are well below the cavity radius, this time can be analyzed using the narrow escape (NE) theory, which describes it as a function of the spot radii and the only parameter of the cavity, its volume, independent of the cavity shape and the particle initial position. We derive an approximate analytical solution for the mean particle lifetime that goes beyond the scope of the NE theory. In particular, our solution shows how this mean lifetime depends on the cavity shape, i.e., its length and radius, the particle initial position in the cavity, and the spot radii, which can be arbitrary. It reduces to the NE solution, as the spot radii tend to zero. To check the accuracy of our approximate result, we determine the mean lifetimes from three-dimensional Brownian dynamics simulations. The comparison shows excellent agreement between the theoretical predictions and simulation results when the initial distance from the particle to both cavity bases exceeds the cavity radius.