Uploaded image for project: 'Cache Modules'
  1. Cache Modules
  2. MGNLCACHE-49

Default cache policy doesn't handle correctly URLs with multi value parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Inactive
    • Neutral
    • None
    • None
    • None
    • None

    Description

      If a site uses the Default policy and decides to extends the caching to URLs with query parameters, the cache will behave incorrectly in presence of multi valued parameters. For example,

      http://host/path?a=1

      and

      http://host/path?a=1&a=2

      will be stored using equal values of the DefaultCacheKey object. This happens because DefaultCacheKey keeps the parameters in a Map<String, String>.

      (I made my test with magnolia on top of Tomcat 6; I guess the way HttpServletRequest#getParameters() "compresses" multiple values in one is not predictable, so a different example might be necessary to replicate the bug on a different container).

      I used Magnolia 4.4.6, but the implementation of DefaultCacheKey has not changed in that respect in both 4.4. and 4.5 branches, so I expect the bug to affect all versions.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              gianluca Gianluca Ortelli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD