socactl cache
socactl cache
helps you visualize and interact with the values stored on SOCA cache system (running on AWS ElastiCache)
Run socactl cache --help
to display help message.
cache get¶
Retrieve the value of a key stored in the cache
./socactl cache get --key "/configuration/PublicSubnets"
['subnet-01df1d82e8e125daf', 'subnet-02747c0e81532b9b9', 'subnet-0ac8c9c3cf4fdb82a']
cache set¶
Create or update a value
# Set new variable
./socactl cache set --key "custom:my_name" --value "mickael"
Cache updated
# Verify Value
./socactl cache get --key "custom:my_name"
mickael
Protected Keys
You cannot update any SOCA Configuration values (e.g key with /configuration
, /system
or /packages
in their name). Instead, you must use socactl config
which will take care of Parameter Store and Cache updates.
cache delete¶
Delete a key
./socactl cache delete --key "custom:my_name"
Key deleted from cache
# Verify
./socactl cache get --key "custom:my_name"
Key not found in cache
cache scan¶
Retrieve all keys cached based on filter pattern
./socactl cache scan --pattern "*"
['/soca/soca-mcrozes/system/dcv/el7/aarch64/version', '/soca/soca-mcrozes/configuration/PrivateSubnets', ...... ]
# Narrow it down to key containing Controller keyword
./socactl cache scan --pattern "*Controller*"
['/soca/soca-mcrozes/configuration/ControllerSecurityGroup', '/soca/soca-mcrozes/configuration/ControllerPrivateIP', '/soca/soca-mcrozes/configuration/ControllerPrivateDnsName', '/soca/soca-mcrozes/configuration/ControllerIAMRoleArn', '/soca/soca-mcrozes/configuration/ControllerIAMRole', '/soca/soca-mcrozes/configuration/ControllerInstanceId']