Nodejs (Infinispan) : Does Infinispan put method returns null for key inserted in cache for first time?

Viewed 26

I have been reviewing the infinispan documentation and overloaded put method returns the value being replaced, or null if nothing is being replaced.

I am using overloaded put method with nodejs and it's not returning expected data, getting undefined.

how can I achieve this with nodejs?

Looked at the documentation, need assistance to understand the behavior with Nodejs

Documentation Link : https://docs.jboss.org/infinispan/9.2/apidocs/org/infinispan/commons/api/BasicCache.html#put-K-V-

V put(K key,
  V value,
  long lifespan,
  TimeUnit unit)

An overloaded form of put(Object, Object), which takes in lifespan parameters.

Parameters:

  • key - key to use
  • value - value to store
  • lifespan - lifespan of the entry. Negative values are interpreted as unlimited lifespan.
  • unit - unit of measurement for the lifespan

Returns:

  • the value being replaced, or null if nothing is being replaced.

Looked at the documentation, need assistance to understand the behavior with Nodejs

1 Answers
Related