Get the value of a public cache property
Ordinarily, you would be able to access the public properties of a cache object using
the dot notation. For example:
c.Connection. However, all cache objects
use dot reference and dot assignment to refer to keys stored in the cache rather than cache
object properties. Therefore,
c.Connection refers to a key named
Connection in the cache instead of the cache's
There is no
setp method since all cache properties are
Get the Value of a Named, Public, Hidden Property
Start a persistence service that uses Redis™ as the persistence provider. The service requires a connection name and an open port. Once the service is running, you can connect to the service using the connection name and create a cache.
ctrl = mps.cache.control('myRedisConnection','Redis','Port',4519); start(ctrl) c = mps.cache.connect('myCache', 'Connection', 'myRedisConnection');
Retrieve the connection name.
ans = 'myRedisConnection'
c — Data cache
persistence provider specific data cache object
A data cache represented by a persistence provider specific data cache object.
Currently, Redis and MATLAB® are the only supported persistence providers. Therefore, the cache objects will be
property — Property name
Property name, specified as a character vector. The common public cache properties
Connection. Provider-specific cache objects may have additional
properties. For example,
mps.cache.RedisCache has the properties
value — Property value
A valid property value.
Introduced in R2018b