put(c,keySet,valueSet)
writes key-value pairs to cache with keys from by keySet, each mapped
to a corresponding value from valueSet. The input arguments
keySet and valueSet must have the same number of
elements, with keySet having elements that are unique.
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');
Add keys and values to the cache and display them as a MATLAB table.
Write a Set of Keys and Corresponding Values to Cache
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');
Add a set of keys and corresponding values to the cache and display them as a
MATLAB table.
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
of type mps.cache.RedisCache or
mps.cache.MATFileCache.
Example: c
key — Key character vector
Key to add, specified as a character vector.
Example: 'keyFour'
value — Value array
Value, specified as an array. value can be any valid
MATLAB data type.
Example: [400, 500]
keySet — Keys cell array of character vectors
Keys, specified as a cell array of character vectors.