Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18152

DirectoryCache should do negative caching

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0-HF22, 7.10
    • Component/s: Directory

      Description

      A DirectoryCache caches entries on read, but should also do negative caching on missing entries.

      Usually a read on a missing entry is rarely, if ever, attempted, but in the particular case of the groupDirectory it happens a lot due to the fact that internally in Nuxeo user ids and group ids are often stored in the same field (for instance in ACLs), and therefore both the groupDirectory and the userDirectory have to be consulted before finding if a given id refers to a group or a user.

      With this improvement, to activate the negative caching, use a contribution like:

         <require>...</require>
        <extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory" point="directories">
          <directory name="groupDirectory">
            <negativeCaching>true</negativeCaching>
          </directory>
        </extension>
      

      This improvement also adds two new metrics on directories:

      • nuxeo.directories.yourDirectoryName.cache.neghits: the number of hits on the negative cache, if activated.
      • nuxeo.directories.yourDirectoryName.cache.misses: the number of cache misses.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: