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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content