.SH SYNOPSIS
.B replace [
.I --codec=codec
.B ] [
.I cache.
.B ]
.I key value 
.B [expires 
.I expiration 
.B [maxidle 
.I idletime
.B ]]
.BR
.B replace [
.I cache.
.B ]
.I key oldvalue newvalue 
.B [expires 
.I expiration 
.B [maxidle 
.I idletime
.B ]]
.SH DESCRIPTION
Replaces the entry for a key only if currently mapped to some value.
.SH ARGUMENTS
.IP cache
the name of the cache where the key/value pair will be stored. If omitted uses the currently selected cache (see the 
.B cache
command)
.IP key
the key which identifies the element in the cache
.IP value
the value to store in the 
.I cache 
associated with the 
.I key
If the 
.I --codec=codec
option has been specified then the key and value will be encoded using the specified codec, otherwise the default session codec will be used. See the
.B encoding
command for more information
.IP expiration
an optional expiration timeout (using the time value notation described below)
.IP idletime
an optional idle timeout (using the time value notation described below) 
.SH DATA TYPES
The CLI understands the following types:
.IP string
a string must be enclosed between single (') or double (") quotes, 
e.g. 'a string' 
.IP int
an integer is identified by a sequence of decimal digits, e.g. 256
.IP long
a long is identified by a sequence of decimal digits suffixed by 'l', 
e.g. 1000l
.IP double
a double precision number is identified by a floating point number
(with optional exponent part) and an optional 'd' suffix, e.g.
3.14
.IP float
a single precision number is identified by a floating point number
(with optional exponent part) and an 'f' suffix, e.g. 10.3f
.IP boolean
a boolean is represented either by the keywords 
.B true 
and 
.B false
.IP UUID
a UUID is represented by its canonical form 
.B XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
.IP JSON
serialized Java classes can be represented using JSON notation, e.g. {"package.MyClass":{"i":5,"x":null,"b":true}}. Please 
note that the specified class must be available to the CacheManager's class loader.
.SH TIME VALUES
A time value is an integer number followed by time unit suffix: days (
.B d
), hours (
.B h
), minutes (
.B m
), seconds (
.B s
), milliseconds (
.B ms
)
