Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1.9
-
None
-
None
-
Patch available
Description
When using cache global with attributes in a caching uri coplet, it is sometimes usefull to specify a parameter that the coplet depends on and that is not a coplet attribute. (the coplet could depend on layout parameters, the current user or something in the session).
The patch I provide solve this problem by adding parameters to the cache key using input modules. The developper can add custom parameters as coplet data attributes :
<attribute>
<name>input-module-cache-key:userlogin</name>
<value xsi:type="java:java.lang.String"
>session-context:authentication/authentication/user/login</value>
</attribute>
<attribute>
<name>input-module-cache-key:myLayout</name>
<value xsi:type="java:java.lang.String"
>portal-layout:MYLAYOUT/aspectDatas/tab</value>
</attribute>
The key used by the cache will contain, after regular coplet attributes : &userLogin=phil&myLayout=4
The patch I provide solve this problem by adding parameters to the cache key using input modules. The developper can add custom parameters as coplet data attributes :
<attribute>
<name>input-module-cache-key:userlogin</name>
<value xsi:type="java:java.lang.String"
>session-context:authentication/authentication/user/login</value>
</attribute>
<attribute>
<name>input-module-cache-key:myLayout</name>
<value xsi:type="java:java.lang.String"
>portal-layout:MYLAYOUT/aspectDatas/tab</value>
</attribute>
The key used by the cache will contain, after regular coplet attributes : &userLogin=phil&myLayout=4