The Axon.ivy ivy Engine caches 20 JSF Dialog views per session. As I have a huge dialog with lots of sub-Dialogs this consuming a lot of memory on the Engine. Can I somehow reduce the amount of cached views?

asked 03.11.2017 at 04:49

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
accept rate: 77%

This can easily be configured in the /webapps/ivy/WEB-INF/web.xml of your engine. Just add the following parameter

    <param-value>10</param-value><!-- defaults to 20 if not set! -->

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


answered 03.11.2017 at 04:50

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

edited 03.11.2017 at 05:03

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 03.11.2017 at 04:49

Seen: 10,952 times

Last updated: 03.11.2017 at 05:03