Cache the length value