Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.6, 1.2.4
-
None
-
None
Description
Actually the class org.apache.myfaces.application.jsp.JspStateManagerImpl.SerializedViewCollection store the old views using:
protected Map getOldSerializedViewsMap() {
if (_oldSerializedViews == null)
return _oldSerializedViews;
}
Right now, this part is used when server side saving is enabled, as a second level cache. If the view is not available on _serializedViews (the map that holds the views in first place) , it tries to get it from _oldSerializedViews. If it is found use it but if not just return null.
The default should be that this behaviour is off (contrary to the current case).
It is more, there should be the possibility to use soft references instead weak references, so the user can tune this by its own needs.
The idea for solve this is create a param called org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE with the possible values:
soft: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT, true)
weak: use an ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true)
off, no: default, no cache is used
The changes should be applied on 1.1 and 1.2.