Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6189

Camel cache: CamelCacheCheck and expiry on cached elements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.10.0, 2.11.0
    • 2.10.5, 2.11.0
    • camel-cache
    • Windows

    • Patch Available
    • Novice

    Description

      The operation CamelCacheCheck does not check to see if the cache element is expired before setting the header CamelCacheElementWasFound. This is due to the way isKeyInCache() from EHCache works.

      I believe the bug/quirk has existed since the very beginning of the camel-cache component. The patch is made against 2.11.0-SNAPSHOT.

      The patch uses getQuiet() instead of isKeyInCache(). getQuiet() checks for element expiry before returning the element from the cache. getQuiet does not alter the cache element in any way (usage statistics etc) but removes the element from the cache if it is expired.

      See the thread on Camel User Forum: http://camel.465427.n5.nabble.com/Camel-cache-CamelCacheCheck-and-expiry-on-cached-elements-td5729404.html

      Attachments

        1. cacheCheckHonorsExpiry.patch
          7 kB
          Henrik Filtenborg Sørensen

        Activity

          People

            davsclaus Claus Ibsen
            hefiso Henrik Filtenborg Sørensen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: