It depends a lot on how many members there are in the ring. As the number of atoms in the ring (n) goes toward infinity, a lactone and ester become functionally identical. Generally you start to notice a difference as n < 6. When n = 5 or lower, the carbonyl stretch shifts to shorter wavelengths (higher energy).