performance – JSF: Should I keep the data list of dataTable in SessionScoped bean or ViewScoped bean – Education Career Blog

Can you guys give me opinion on these scenario:
1. data list is large and update quite often
2. data list is small and does not update that often
3. any other interesting case that you guys think a noob like me should know

,

Always prefer view scope to session scope. In the general case the data in a dataTable is not session-wide, it is for the current view.

You can use the session as some sort of cache, but that cache better be in another place – i.e. between your application and your storage.

Leave a Comment