setIfAbsent

Set value for the specified key only if there is no value available for specified key.

Return

Value associated with the key on success (old or new depending if value was set), otherwise a string describing an error.

Parameters

key

Key.

value

Value to be set.