Skip to content

Latest commit

 

History

History
74 lines (43 loc) · 3.56 KB

configuring-datagrip-for-valkey.md

File metadata and controls

74 lines (43 loc) · 3.56 KB

Configuring DataGrip for Valkey

Overview

Valkey is a new-enough fork that there is very little support in existing Redis clients for it. It is a fork of Redis 7.2 (OSS), with additional features added in later releases.

However, where most clients have an issue is in the hello handshake. Where most clients expect REDIS in the handshake, Valkey uses VALKEY. As a result, most clients fail to connect. However, DataGrip allows you to bypass this error, which makes it one of the only working Valkey clients I've been able to find.

Connecting to the Valkey cache

Using the Docker Compose definition from this repository, port 6379 is exposed on localhost. There is no authentication required for this local-only development container.

  1. After launching DataGrip, create a new Redis connection.

    Selecting a new Redis data source
  2. The connection requires configuration. As long as there are no changes from the default compose.yml, the following screenshots should be correct. Upon choosing Test Connection, you will receive a failure. This is expected.

    Configuring the connection
    Field Recommended value
    Name Whatever name you like
    Host localhost
    Port 6379
    Authentication No auth
    Apply
    Test connection
  3. As previously mentioned, Redis clients tend to fail with Valkey because the client handshake doesn't match what is expected. The workaround is to disable the connection verification.

    Disable the connection verification
  4. Upon a second Test Connection, subsequent connections should succeed.

    Test the connection again
  5. Once everything looks good, choose the OK button.

    Choose OK
  6. Ensure that database #0 is selected. If it is not already showing, select the ellipsis (), check Default database, then press the Enter/Return button.

    Enabling the default database #0

Viewing cached entries

  1. If you want to view the data which has been cached:

    1. Find the string entry you're interested in.
    2. Right-click and choose Edit Data. This will show the data on one line.
    3. To expand the view, right-click and choose Show Record View.

    Viewing the cached data
  2. Without the right-click menus showing, this is what the view looks like with everything opened.

    Viewing the cached data (unobstructed)

Deleting cached entries

  1. If you have a need to delete a cache value, right-click and choose Drop.

    Dropping an entry
  2. You will be prompted to confirm the deletion. Choose OK.

    Choose OK
  3. The next time the local copy of the API requests this domain name, it will re-cache.