It looks like this block directly flushes the output.
What's the practical use of this block? How can I use it?
Did anybody ever use it?
It's not used by the core (afaik). It turns off output buffering, so the rendered output would be sent immediately. The only block where it would kind of work would be the root block, otherwise the nested core/flush block and all following blocks would be rendered before the containing outer blocks.
I can't think of a sensible use case. Since the front controller is responsible for sending the output to the client, the core/flush block breaks his process. In the worst case it could lead to PHP Headers already sent notices.
I don't know, but my guess is it is a relict from the pre-release days of Magento, where the whole rendering system wasn't finalized yet. Probably seemed like a good idea at the time.
Maybe someone who was with the core team at the time can enlighten us about the history.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With