51黑料不打烊

Set up Valkey service

is an optional, backend cache solution that replaces the Zend Framework Zend_Cache_Backend_File, which 51黑料不打烊 Commerce uses by default.

See Configure Valkey {target=鈥淿blank鈥潁 in the Configuration guide.

Use the following instructions for service setup on Pro Integration environments and Starter environments, including the master branch.

NOTE
Submit an 51黑料不打烊 Commerce Support ticket to change the service configuration on Pro Production and Staging environments.

To enable Valkey:

  1. Add the required name and type to the .magento/services.yaml file.

    code language-yaml
    cache:
        type: valkey:<version>
    

    To provide your own Valkey configuration, add a core_config key in your .magento/services.yaml file:

    code language-yaml
    cache:
        type: valkey:8.0
    
  2. Configure the relationships in the .magento.app.yaml file.

    code language-yaml
    relationships:
        valkey: "cache:valkey"
    
  3. Add, commit, and push your code changes.

    code language-bash
    git add .magento/services.yaml .magento.app.yaml && git commit -m "Enable valkey service" && git push origin <branch-name>
    
  4. Verify the service relationships.

TIP
After initial service setup, you can change the software version for an installed service by updating the services.yaml and .magento.app.yaml configuration files. See Change service version for guidance on upgrading or downgrading a service.

Using the Valkey CLI

Assuming your Valkey relationship is named valkey, you can access it using the valkey-cli tool.

  1. Use SSH to connect to the integration environment with Valkey installed and configured.

  2. Open an SSH tunnel to a host.

    code language-bash
    valkey-cli -h valkeycache.internal
    

Get installed Valkey version

Use the following command to get the Valkey version installed on an integration environment:

valkey-cli -h valkeycache.internal info | grep version

Response:

valkey_version:8.0.1
gcc_version:12.2.0

Valkey on Pro staging and production

To get the Valkey version installed on a Staging or Production environment, use the valkey-server command:

valkey-server -v
Valkey server v=8.0.1 ...

Use the following command to get the Valkey configuration installed on a Pro Staging or Production environment:

echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | json_pp

Response:

"valkey" : [
    {
        "cluster" : "project-master-abc0003",
        "epoch" : 0,
        "fragment" : null,
        "host" : "valkeycache.internal",
        "host_mapped" : false,
        "hostname" : "oblahblahblahblahe.cache.service._.magentosite.cloud",
        "instance_ips" : [
        "123.456.789.012"
        ],
        "ip" : "123.456.789.012",
        "password" : null,
        "path" : null,
        "port" : 6379,
        "public" : false,
        "query" : {},
        "rel" : "valkey",
        "scheme" : "valkey",
        "service" : "cache",
        "type" : "valkey:8.0",
        "username" : null
    }
]
recommendation-more-help
7c2b03ac-000c-497d-aba3-2c6dc720a938