Ternaries are like all things, good when used appropriately. The
question to ask is "is it immediately obvious to the reader what the
ternary is doing?". A nested ternary is going to fail that test
pretty much every time (so do regular expressions for that matter).
It would be more readable to blow that array() statement up and
construct it piece by piece. Ironically, in doing that you could use
the JFactory::getConfig() directly if you wanted.
I agree that $dispatcher and $cache are unnecessary in this case (and
if you rebuilt the array, so is $conf). So is the comment "Trigger
the onContentCleanCache event" for that matter (Anthony Ferrera has a
good post on keeping your inline comments to a minimum, preferably
zero, providing you write your code so there is no confusion about
what it's doing - moderation is still required but there are some good
rules of thumb there).
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla developers