Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6413

FileCache getIfPresent doesn't update cache hit/miss counters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.1
    • 1.7.4, 1.6.3, 1.8.0
    • blob
    • None

    Description

      FileCache.getIfPresent bypasses cache access if key is not in cache and CacheStats for "DataStore-DownloadCache" MBean will always have 100% hit rate even when Blobs will be downloaded from the BlobStore backend by AbstractSharedCachingDataStore because of the miss in the cache.

      I suggest the following change:
      FileCache.getIfPresent to call CacheLIRS.getIfPresent which will update the cache stats (miss and hit counters).

      Attachments

        Activity

          People

            amitjain Amit Jain
            ioancris Ioan-Cristian Linte
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: