A pancake lens is colloquial term for a flat, thin lens (short barrel), generally a normal or slightly wide prime lens for a camera.
Pancake lenses are primarily valued for providing quality optics in a compact package. The resulting camera and lens assembly may even be small enough to be pocketable, a design feature which is usually impractical with conventional SLR bodies and lens assemblies. Pancake lenses can be very short and flat because they do not need large amounts of optical correction, i.e. extra lens elements.
The problem arises when such lenses have too short a focal length to fit in front of the retractable mirrors used in reflex cameras. In such a situation, a pancake lens focuses in front of, rather than on, the focal plane (film or light sensor) of the camera. This has necessitated the design of retrofocus lenses that refocus the image further back, which is why such lenses are longer and bulkier than their "pancake" equivalents.
Pancake-style prime lenses are generally simpler to manufacture than pancake zoom lenses like Sony E PZ 16-50mm F3.5-5.6 due to the general lack of an internal micromotor and fewer image correcting elements, allowing for a thinner profile. Because of this limitation, pancake zoom lenses are much less common.
There' is no specific size and weight to consider as a pancake lens. Sony FE 35mm F2.8, Pentax DA 35mm F2.8 macro, Pentax DA 70mm F2.4, and other flat and small lenses are also considered as a pancake lens.
A body-cap lens is an extreme type of pancake lens that is designed to both protect the camera internals as a body cap normally would, yet still allow the user to take photos. These lenses generally have no more than a couple optical lens elements, no image correcting elements, a very-slow fixed aperture, an extremely thin focusing ring, and a retractable lens element cover. Due to this compromise in design, body-cap lenses generally suffer from numerous image quality issues such as heavy vignetting and poor image sharpness.
Examples of body-cap lenses include the Olympus Body Cap Lens 15mm f/8 and the Fujifilm XM-FL 24mm f/8.
An early example is the (Zeiss) Tessar of 1902.
In the 1960s and 1970s the Nikon GN lens was a notable example, while in the 1970s and 1980s pancake lenses were used in compact single lens reflex (SLR) cameras.