Cocoon 3
  1. Cocoon 3
  2. COCOON3-30

The current implementation of the ParameterCacheKey actually breaks the caching

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-alpha-1
    • Fix Version/s: 3.0.0-alpha-2
    • Component/s: cocoon-pipeline
    • Labels:
      None

      Description

      The equals() and hashcode() implementations of the ParameterCacheKey do *not* take the actual parameters into account.
      This makes it possible that different pipeline setups have the same cache key and overwrite their cached results.

        Activity

        Hide
        Steven Dolg added a comment -
        This patch changes the implementation of equals() and hashcode() to actually use the parameters.

        While this results in correct behaviour, it will also prevent asynchronous caching.
        I believe that this type of CacheKey cannot provide both synchronous and asynchronous caching and thus think this is the proper solution.

        I will delay committing this patch for some days, just in case someone comes up with a different opinion...
        Show
        Steven Dolg added a comment - This patch changes the implementation of equals() and hashcode() to actually use the parameters. While this results in correct behaviour, it will also prevent asynchronous caching. I believe that this type of CacheKey cannot provide both synchronous and asynchronous caching and thus think this is the proper solution. I will delay committing this patch for some days, just in case someone comes up with a different opinion...
        Hide
        Steven Dolg added a comment -
        Patch applied.
        Show
        Steven Dolg added a comment - Patch applied.
        Hide
        Javier Puerto added a comment -
        I've noticed while developing the patch for COCOON3-100 that ParameterCacheKey break the caching returning "-1" for last modified value. This make caching by last modified useless because it's used for all pipelines.
        Show
        Javier Puerto added a comment - I've noticed while developing the patch for COCOON3-100 that ParameterCacheKey break the caching returning "-1" for last modified value. This make caching by last modified useless because it's used for all pipelines.
        Hide
        Thorsten Scherler added a comment -
        The problem with the current implementation is that the ResponseHeaderCollector is collecting the lastModified if the etag is not set.
        Show
        Thorsten Scherler added a comment - The problem with the current implementation is that the ResponseHeaderCollector is collecting the lastModified if the etag is not set.

          People

          • Assignee:
            Unassigned
            Reporter:
            Steven Dolg
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development