mps-cache
Control persistence service from command line on Windows, Linux, and macOS systems
Syntax
mps-cache [
operation
] [-C server_path
] [--connection connection_name
] [--all] [--configFile provider_config_file_path
] [--key cache_access_key_string
] [--timeout seconds
] [--verbose | -v] [--help |-h]
Description
mps-cache [
controls the persistence service based on the specified operation
] [-C server_path
] [--connection connection_name
] [--all] [--configFile provider_config_file_path
] [--key cache_access_key_string
] [--timeout seconds
] [--verbose | -v] [--help |-h]operation
.
The supported operations are start
, stop
,
restart
, ping
, attach
, and
detach
.
The option connection_name
is obtained from the JSON file
mps_cache_config
. This file must be created by an administrator and
placed in the config
folder of the server instance. The JSON structure of
the mps_cache_config
file
is:
{ "Connections": { "<connection_name>": { "Provider": "Redis", "Host": "<hostname>", "Port": <port_number> } } }
<connection_name>
,
<host_name>
and <port_number>
are the only fields that can be set by the administrator and
<port_number>
has to be a non-SSL port. Currently, Redis™ is the only supported persistence service provider. You can have multiple
connections to the persistence provider.Input Arguments
|
Note You cannot start, stop, or restart a remote persistence service. |
|
Path to the server instance. |
|
Name of connection to persistence service. Specify either |
|
Connect to all the persistence services specified in
|
|
Path to the persistence provider configuration file. |
|
Access key string to connect to an Azure® Redis Cache instance obtained from the Azure portal. For an example, see Ping Remote Persistence Service. |
|
Set a limit on how long |
|
Displays system messages relating to controlling the persistence service. |
|
Displays options for using the |
Examples
Start Persistence Service
Start a persistence service on Windows® assuming a connection name myConnection
has been defined in
the file mps_cache_config
.
Type the following at the system command line:
mps-cache start -C "h:\server\mps_instance" --connection myRedisConnection
mps-cache ping -C "h:\server\mps_instance" --connection myRedisConnection
Sending ping to Redis on localhost:9710. Redis service running on localhost:9710.
The corresponding mps_cache_config
file for the example
follows:
{ "Connections": { "myRedisConnection": { "Provider": "Redis", "Host": "localhost", "Port": 9710 } } }
Ping Remote Persistence Service
Assuming an Azure
Redis Cache instance has been setup in the Azure portal and a connection name
myRemoteAzureRedisCacheConnection
has been defined in the file
mps_cache_config
.
mps-cache ping -C "h:\server\mps_instance"
--connection myRemoteAzureRedisCacheConnection
--key +WcI8pU0YodDMsw1LLC7gInkjtrjamLBRoq9rQQdMTU=
Sending ping to Redis on azure.redis.cache.windows.net:6379. Redis service running on azure.redis.cache.windows.net:6379.
The corresponding mps_cache_config
file for the example
follows:
{ "Connections": { "myRedisConnection": { "Provider": "Redis", "Host": "localhost", "Port": 9710 }, "myRemoteAzureRedisCacheConnection": { "Provider": "Redis", "Host": "azure.redis.cache.windows.net", "Port": 6379 } } }
Tips
To retrieve an access key to connect to an Azure Redis Cache instance:
Log in to your Azure portal and select your Azure Redis Cache instance.
Select Overview and under Keys click Show access keys.
In the resulting blade, copy the access key string listed under Primary.
Version History
Introduced in R2018b