# Slim Twig Flush

**URL:** <https://discourse.slimframework.com/t/slim-twig-flush/3747>\
**Category:** Questions\
**Created:** [December 20, 2019, 6:15pm UTC](https://discourse.slimframework.com/t/slim-twig-flush/3747 "2019-12-20T18:15:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvisreis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/elvisreis/32/1298_2.png) [@elvisreis](https://discourse.slimframework.com/u/elvisreis)\
**Post date:** [December 20, 2019, 6:15pm UTC](https://discourse.slimframework.com/t/slim-twig-flush/3747/1 "2019-12-20T18:15:37Z")

</div>

I need to send some flush while the page is being processed using slim with twig.

I need to render a page and still flush it

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [December 20, 2019, 8:59pm UTC](https://discourse.slimframework.com/t/slim-twig-flush/3747/2 "2019-12-20T20:59:38Z")

</div>

You could try the `flush` tag to tell Twig to flush the output buffer:

[https://twig.symfony.com/doc/3.x/tags/flush.html](https://twig.symfony.com/doc/3.x/tags/flush.html)

A custom middleware could convert the flushed output buffer to a PSR-7 stream.
