An entry does not expire forever when lifespan=0 is specified to cache.put() in JDG client-server mode

Solution Unverified - Updated -

Issue

  • An entry does not expire forever when "lifespan=0" is specified to cache.put() in JDG client-server mode.
  • Java API doc BasicCache#put() says "Negative values are interpreted as unlimited lifespan" for lifespan parameter. As 0 is not a negative value, I think an entry expires immediately when "lifespan=0" is specified to cache.put() (or putIfAbsent(), etc). However, the entry actually does not expire foreever. And the metadata of the entry returned "lifespan=-1".

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.