Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1717

Use custom cache keys for caching uri coplets using input modules.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.9
    • None
    • Blocks: Portal
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            phil@anyware-tech.com Philippe Gassmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: