An implantable product includes an optical cavity structure with first and second parts, each of which operate as an optical cavity. The first part includes a container with at least one opening through which bodily fluid can transfer between the containers interior and exterior when the product is implanted in a body. The second part includes a container that is closed and contains a reference fluid. The implantable product can also include one or both of a light source component and a photosensing component. Photosensed quantities from the first parts output light can be adjusted based on photosensed quantities from the second parts output light. Both parts can have their light interface surfaces aligned so that they both receive input light from a light source component and both provide output light to a photosensing component.