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

Cache non-existing resources

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Resource Resolver 1.10.0
    • None
    • ResourceResolver
    • None

    Description

      I found that in many situations various Sling features probe for the existence of resources, for example the Sling Servlet Resolution and also Sling Context-Aware Configuration. If these functions are called multiple times during the lifetime of a ResourceResolver, the ResourceResolver always checks for the presence of these resources and will consistently return "null" (non-existing resource).
      Due to the MVCC pattern we can cache the information that a resource does not exist at the ResourceResolver.

      To support changes performed to the Repository by this specific ResourceResolver, this cache should be purged by a modifying operations (move, copy, create, delete), but also on refresh.

      (Background: I found that for the rendering on a mildly complex AEM page (WKND sample content) I have 18 paths, for which the existence of a resource is tested more than 50 times and consistently returned "null". I expect that a caching of this information will save a good number of CPU cycles in Oak.

      Attachments

        Activity

          People

            joerghoh Joerg Hoh
            joerghoh Joerg Hoh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: