> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Redis with Upstash

> Provision a free serverless Redis instance for caching website translations.

CAMB AI Website Translation uses Redis to cache translated text so visitors get instant page loads after the first visit. This guide walks you through creating a free Redis database on [Upstash](https://upstash.com) and wiring it up to your Website Configuration.

## 1. Sign up for Upstash

Navigate to [https://upstash.com](https://upstash.com).

![Upstash landing page](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image1.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=ed38a28cbc0b7bf59c9bd9988ad8c5dd)

Figure 1 — Upstash landing page

Create an account using GitHub, Google, or email.

![Upstash login page](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image2.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=824fe3e9e16b7552ba3b483febfd4dd7)

Figure 2 — Upstash login page

After signing in, you'll be directed to the **Upstash Console**.

![Upstash Console dashboard](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image3.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=33eb5af9361ad9f10171e8d020f58e1e)

Figure 3 — Upstash Console

## 2. Create a new Redis database

From the dashboard, select **Redis** and then **Create Database**.

Configure the database:

* **Name** — Assign a descriptive name (for example, `project-cache-db`).
* **Region** — Select a region close to your application hosting location to minimize latency.
* **Plan** — Choose the free plan if you're testing or working on a small project.

![Create Database form](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image4.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=22afde5f2d0130f366ce6ea22a5a9fd0)

Figure 4 — Create Database

![Plan selection screen](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image5.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=ea23a85b2ba3ecdc4799e19ab581d52c)

Figure 5 — Select a Plan

Click **Create**. After a few seconds, your database will be available.

![Redis database dashboard](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image6.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=aa1047a49fa392c361d93e7a7d7ab1d0)

Figure 6 — Redis database dashboard

## 3. Access connection details

Once the database is created, you'll see:

* The **REST API URL**
* The **REST Token**
* The **Redis Connection URL** — this is what you'll paste into your CAMB AI Website Configuration as the **Redis Cache URL (Secure)**.

![Redis database connection details panel](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image7.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=9547887b28077d817b20bbd763353f28)

Figure 7 — Redis database connection details

> [!WARNING]
>
> Make sure the Redis Connection URL you copy starts with `rediss://` (note the double `s`). This is the TLS-encrypted endpoint required by the Website Translator.

## 4. Clearing the Redis cache

If you need to clear all cached translations from your Redis database, use the Flush functionality.

* From the Upstash Console, open your Redis database.
* Navigate to the **CLI** tab.

![Upstash CLI tab](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image8.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=c83c9b85feda3528f5a4db1c2b968381)

Figure 8 — CLI tab

* Execute the `FLUSHALL` or `FLUSHDB` command.

![Running FLUSHDB in the Upstash CLI](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image9.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=cce3e7dd6ab3cf196b7ad0adef1cc09a)

Figure 9 — FLUSHDB command

## 5. Time-to-Live (TTL) and inactivity

Redis allows you to set a time-to-live (TTL) on keys. The TTL specifies how long a key remains in the cache before being automatically deleted.

Key points about TTL behavior:

* **Expiration** — When the TTL for a key reaches zero, Redis automatically deletes it.
* **No TTL set** — If you don't set a TTL, the key will persist until explicitly removed.
* **Inactivity** — Redis does not automatically expire keys due to inactivity unless a TTL has been defined.

## 6. Monitoring and management

In the Upstash dashboard, you can:

* Review memory usage and request metrics by going to the **Usage** tab.

![Usage tab showing memory and request metrics](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image10.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=247601a9e8b6acce00e627da48382633)

Figure 10 — Usage tab

* Monitor keys and expiration patterns.
* Reset credentials or delete the database when no longer needed.

![Credentials management panel](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image11.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=0fdc48d772c916e630080147462fb2eb)

Figure 11 — Credentials management

## 7. Connect Redis to your Website Configuration

With your Upstash database ready, integrate it into CAMB AI Studio:

1. Open the **Website Configuration** form in Studio.

![Website Translation configuration form](https://mintcdn.com/cambai/hO3-jvB7423Hixvi/images/other-products/upstash/image12.png?fit=max\&auto=format\&n=hO3-jvB7423Hixvi\&q=85\&s=9f688a52b2b74c51125b2c5f096c8018)

Figure 12 — Website Translation form on Studio

2. Provide the following:
   * **Name** — A friendly name for your project (e.g., `My Website`).
   * **Domain** — Your production domain (e.g., `example.com`).
   * **Redis Cache URL (Secure)** — The secure `rediss://` connection string from your Upstash database.
   * **Translate From** — The source language for your website's content.
   * **Translate To** — One or more target languages.

3. Click **Create Website**. This generates an API key for your project, which your application can use to fetch and cache translations.

Next, see [Next.js (Page Router)](https://docs.camb.ai/other-products/website-translation/nextjs-page-router.md) to drop the script into your app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.