Skip to content

edhctl cache

edhctl cache helps you visualize and interact with the values stored on EDH cache system (running on AWS ElastiCache)

Run edhctl cache --help to display help message.

cache get

Retrieve the value of a key stored in the cache

./edhctl cache get --key "/configuration/PublicSubnets"
['subnet-01df1d82e8e125daf', 'subnet-02747c0e81532b9b9', 'subnet-0ac8c9c3cf4fdb82a']

cache set

Create or update a value

# Set new variable
./edhctl cache set --key "custom:my_name" --value "mickael"
Cache updated

# Verify Value
./edhctl cache get --key "custom:my_name"
mickael

Protected Keys

You cannot update any EDH Configuration values (e.g key with /configuration, /system or /packages in their name). Instead, you must use edhctl config which will take care of Parameter Store and Cache updates.

cache delete

Delete a key

./edhctl cache delete --key "custom:my_name"
Key deleted from cache

# Verify
./edhctl cache get --key "custom:my_name"
Key not found in cache

cache scan

Retrieve all keys cached based on filter pattern

./edhctl cache scan --pattern "*"
['/edh/soca-mcrozes/system/dcv/el7/aarch64/version', '/edh/soca-mcrozes/configuration/PrivateSubnets', ...... ]

# Narrow it down to key containing Controller keyword
./edhctl cache scan --pattern "*Controller*"
['/edh/soca-mcrozes/configuration/ControllerSecurityGroup', '/edh/soca-mcrozes/configuration/ControllerPrivateIP', '/edh/soca-mcrozes/configuration/ControllerPrivateDnsName', '/edh/soca-mcrozes/configuration/ControllerIAMRoleArn', '/edh/soca-mcrozes/configuration/ControllerIAMRole', '/edh/soca-mcrozes/configuration/ControllerInstanceId']