LocalCloud Memorystore (Redis/Valkey) Local Emulator
Get started
local.cloud — Memorystore (Redis/Valkey) Local Emulator .md Open tab

Memorystore (Redis/Valkey)

Memorystore provides managed in-memory data services on Google Cloud. LocalCloud uses a Valkey runtime for documented Redis-compatible commands and instance metadata.

When to use Memorystore (Redis/Valkey)

Typical uses

Use when frequently accessed values, expiring entries, counters, or streams fit Redis commands and an in-memory access model. Choose key names and expiries around the application's cache or queue behavior.

Examples

  • Application caches and counters
  • Redis-compatible queues and streams
Databases

Explore another service

View all
Local workflow

Example usage

Install the CLI, start LocalCloud, and export its environment in the same shell. Generated endpoints account for remapped ports.

1. Install and start · shell
curl -fsSL https://local.cloud/install.sh | sh
localcloud start --local-only
# Export GOOGLE_CLOUD_PROJECT and REDIS_HOST
eval "$(localcloud env)"

Test a cache hit and expiry

  1. Connect a Redis-compatible client to the local endpoint.
  2. SET a test key with an expiry and GET its value.
  3. Verify the cache-miss path after the key expires.

Documented workflows

  • Valkey RESP, Lua, Pub/Sub, streams, and transactions
  • Redis instance lifecycle, configuration, version labels, and AUTH retrieval

Service boundaries

  • Shared server; database numbers do not isolate Pub/Sub channels
  • No multi-shard topology, managed failover, or project authorization
Try it in your project

Code examples and integrations

Start with the local guides. Official Google Cloud samples may need endpoint changes and can cover features outside the workflows listed here.

Agent testing

Use Memorystore (Redis/Valkey) with an AI agent

Before the agent changes application logic, have it create local Memorystore (Redis/Valkey) state, read it back with the project SDK, and note which feature the check covered. That first local call catches accidental production routing and needs no GCP account, service-account key, or billing project.

Configure this repo

Set up this repository to use LocalCloud for local GCP development. First read https://local.cloud/ai/agents.md, then inspect this repo, identify the GCP services and SDK language, configure emulator environment variables, and run the narrowest integration test against localhost. Do not use real GCP credentials or production endpoints.

Production endpoints, auth, IAM, quotas, regional behavior, and final release validation still need the target Google Cloud project.

Agent resources has more prompts and the AGENTS.md template.

Related guides

Desktop view