Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6588

More granularly invalidate the cached ValidationModels

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Validation 1.0.0
    • Validation 1.0.0
    • Validation
    • None

    Description

      Currently ValidationModelProviders are asked once for validation models for a specific resource type. The result is cached, which may be invalidated as a whole by the ValidationModelProvider as well.
      While this works, it always requires a full cache invalidation whenever a new model come into play. Consider the following use case:

      1. Only one model for resource type a is available with applicablePath = /content
      2. The model is retrieved from the ValidationModelProvider for a validation of a resource below /content/test/c
      3. A new model for resource type a becomes available with applicablePath = /content/test
        That new model should take precedence because its applicable path is more specific. This would only work if between 2. and 3. the cache is fully invalidated.

      The new model is actually never leveraged unless the full cache is invalidated in between.

      Attachments

        Activity

          People

            kwin Konrad Windszus
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: