---
title: I'm not seeing the latest version of my prompt. Why?
description: Learn why you might see outdated prompt versions in Langfuse and how to resolve caching-related issues in both the SDK client cache and the server-side Redis cache.
tags: [prompt-management, prompt-management-get-started]
---

# I'm not seeing the latest version of my prompt. Why?

If you've updated a prompt in Langfuse but your application still returns the old version, it's likely due to **caching behavior**. The Langfuse SDKs cache prompts locally to ensure low latency and to keep your application running even if Langfuse would be temporarily unavailable.

For a detailed explanation, see the [prompt caching documentation](/docs/prompt-management/features/caching).

## Solutions

### 1. Wait for cache revalidation

The SDK cache TTL is **60 seconds** by default. After this time, the cached prompt is marked as stale. On the next `get_prompt` call, the stale prompt is returned immediately while the SDK fetches the new version in the background. This means **you need two fetches after the TTL expires** to see the updated prompt.

### 2. Disable caching for development

Set `cacheTtlSeconds` to `0` to always fetch the latest prompt.

> **Note:** Disabling caching adds a network request on every `get_prompt` call, which will increase latency. This is recommended for development/testing only.

<LangTabs items={["Python SDK", "JS/TS SDK"]}>
<Tab>

```python
prompt = langfuse.get_prompt("my-prompt", cache_ttl_seconds=0)
```

</Tab>
<Tab>

```ts
const prompt = await langfuse.prompt.get("my-prompt", {
  cacheTtlSeconds: 0,
});
```

</Tab>
</LangTabs>

### 3. Verify the correct label

By default, `get_prompt` fetches the `production` label. If you haven't promoted your changes to production, use `label="latest"` to fetch the most recent version:

<LangTabs items={["Python SDK", "JS/TS SDK"]}>
<Tab>

```python
prompt = langfuse.get_prompt("my-prompt", label="latest")
```

</Tab>
<Tab>

```ts
const prompt = await langfuse.prompt.get("my-prompt", {
  label: "latest",
});
```

</Tab>
</LangTabs>

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/faq/all/old-prompt-version-caching.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx langfuse-cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
