Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13632

Wrong key generation in XWikiCacheStore

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.2.1
    • Fix Version/s: 8.3-rc-1
    • Component/s: Old Core
    • Labels:
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Hibernate store is always loading the document from the wiki indicated in the context completely ignoring the wiki in the XWikiDocument object. That means that doc.getKey() may be different than the key of the document that will actually come from the hibernate store.

      Solution: Generate the initial cache key with a mix of the wiki id located in the context and the XWikiDocument reference.

      Otherwise not the same document is delivered in both possible situations.
      1. from cache
      2. freshly loaded

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                fabian.pichler Fabian Pichler
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: