2 Replies Latest reply on Feb 3, 2017 3:08 AM by Malaiappan Kannan

    Max-Idle for expiration - does not respect GET cache

    Malaiappan Kannan Newbie

      My cache config

        <expiration lifespan="120000" max-idle="60000" interval="30000" />

       

      max-idle is configured as 1 min.

       

      My requests

      Test 1:

      PUT 31/Jan/2017:16:18:38 - created

      GET 31/Jan/2017:16:18:45 - found (within 1 min)

      GET 31/Jan/2017:16:19:41 - cache expired (after 1 min from PUT, but within 1 min from previous GET)

       

      Test 2:

      PUT 31/Jan/2017:16:22:33 - created

      PUT 31/Jan/2017:16:23:03 - created

      GET 31/Jan/2017:16:23:40 - found (after 1 min from first PUT, within 1 min from 2nd PUT)

      GET 31/Jan/2017:16:24:05 - cache expired (after 1 min from 2nd PUT, but within 1 min from previous GET)

       

      Question:

      Is GET cache (Cache.getAdvancedCache().getCacheEntry(key)) considered as operation before executing max-idle logic?

      If any specific config has to be done to achieve this, please let me know the same.

       

      Thanks