How to clear pageFlowScopes and view caches from session when we are sure its no longer required?
Following clears pageFlowScope map in current request context
RequestContext requestContext = RequestContext.getCurrentInstance();
requestContext.getPageFlowScope().clear();
But if I dump http-session attributes I still see many instances of PageFlowscopes in the session
org.apache.myfaces.trinidadinternal.application.PageFlowScope.ois6p8lk1
org.apache.myfaces.trinidadinternal.application.PageFlowScope.ois6p8lk2
org.apache.myfaces.trinidadinternal.application.PageFlowScope.ois6p8lk3
and view caches as well
org.apache.myfaces.trinidadinternal.application.VIEW_CACHE.1qvzgdgkw
org.apache.myfaces.trinidadinternal.application.VIEW_CACHE.2qvzgdgkw
org.apache.myfaces.trinidadinternal.application.VIEW_CACHE.3qvzgdgkw
Obviously if I clear session attributes it will all go away but I don’t want to do that, Is there any other way ?
Using
- trinidad-api-1.0.10.jar
- myfaces-impl-1.1.5.jar
EDIT
Also observed following attribute is kept in session forever, and the content grows over time
org.apache.myfaces.trinidadinternal.Change
PageFlowScope
If not planning to use multiple pageflowscopes following entry in
trinidad-config.xmlcan be alteredThis will control number of
org.apache.myfaces.trinidadinternal.application.PageFlowScopekept in session.VIEW_CACHE
If not planning to use
VIEW_CACHEfollowinginit paramsinweb.xmlcan be configured to a minimal value.This will keep control over number of
org.apache.myfaces.trinidadinternal.application.VIEW_CACHEkept in sessiontrinidadinternal.Change
I couldn’t find a way to to avoid this.
Ended up using following method to cleanup