This can easily be configured in the `/webapps/ivy/WEB-INF/web.xml` of your engine. Just add the following parameter
<context-param>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
<param-value>10</param-value><!-- defaults to 20 if not set! -->
</context-param>
**Why does JSF cache the views at all?**
These views are kept in the memory to allow the user open multiple dialogs in separate taps. Furthermore it also make back-navigation with the browser possible. At least while the previous dialog was not closed by executing a `close dialog` event.
**What is the drawback of this cache?**
This cached views can grow big if you have huge dialog with many embedded sub-dialogs. Especially if you eagerly render all their contents even when they are not visible until the user opens a pop-up, sub-tab or similar. The size come from holding the complete view state and @ViewScoped managed beans. So you could run into OutOfMemoryErrors on the engine if you have many users on your engine that open huge dialogs.
**When to limit the cache?**
If you run out of memory on the engine. And you know that most of the time your users are only working with a single browser-tab. Then it could be sufficient to only cache the last 5 or 10 views.
![sample web.xml][1]
[1]: https://answers.axonivy.com/upfiles/web.xml_lessViewsInSession.png