[
http://jira.jboss.com/jira/browse/JBPORTAL-1325?page=comments#action_1236... ]
Antoine Herzog commented on JBPORTAL-1325:
------------------------------------------
For what I remember, you explained somewhere (forum ?) that the cache was stored in the
session, so login change are taken into account implicitly (cache follow the session
lifecycle).
So this is not an issue. (I did this jira in march when exploring things about cache).
Should be closed.
just in case, I don't know about 2.6 (not upgraded yet my cache features for nav menu
etc...)
but if the cache is still in session (still no change, no use of JBoss Cache ?), it should
be still ok.
ConsumerCacheInterceptor : should not use the cache just after login
--------------------------------------------------------------------
Key: JBPORTAL-1325
URL:
http://jira.jboss.com/jira/browse/JBPORTAL-1325
Project: JBoss Portal
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Portal Core
Environment: jbp 2.4.0
Reporter: Antoine Herzog
Assigned To: Julien Viet
Fix For: 2.8 Final, 2.6.1 Final
Use case :
- user come to the site.
- Portlet show views for unchecked user. These views are put in the cache.
- user log in, let's say as admin
- the cached views still show the previous things, not taking into account the change of
authorizations
- the user can't see the proper things
usual needs :
- for I18n portals : change of locale when user log in. all the portlets must do the
change, not depending on cache
- for admin or special roles features in the portlet views
- for modes depending on roles (see forum post)
In the default portal, there are no use of cache. so all these use cases are fullfiled.
to reproduce the problem :
- put some cache on the user portlet (great feature for prod), the user portlet window
may not update after logging.
resolution :
in the ConsumerCacheInterceptor
the CacheKey do not take into account the login state.
see : public CacheKey(StateString navigationalState, WindowState windowState, Mode mode)
so store the user name (or "unchecked") in the CacheEntry.
put the parameter "userOfFragment" in the CacheKey.
when retrieving the CacheEntry, compare the currentUser and the userOfFragment, and
don't use the cache if different.
just to see : can we have access to the logued user in this interceptor ? (that, i
don't know)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira