It seems nobody has answered your question. The first thing to note is
that \cadenzaOn and \cadenzaOff commands affect the full score, i.e. all
staves. Otherwise, I think the description in the Notation Reference
more or less says it all, namely that \cadenzaOn simply tells LilyPond
to stop
Because of a question on the german forum, I thought I'd ask here. Is
the music in a cadenza supposed to take up no time? Consider the
following:
\version 2.12.1
\relative c'{
\time 2/4
\set Score.skipBars = ##t
c4 d
{ R2^G.P. }
\new Staff { \cadenzaOn e4 f e d