# How Anthropic's Prompt Caching Affects RAG Costs and Use Cases

DevFeed: [How Anthropic's Prompt Caching Affects RAG Costs and Use Cases](<https://devfeed.tech/articles/does-prompt-caching-make-rag-obsolete-33436.md>)

Original publisher: [Read original article](<https://timkellogg.me/blog/2024/08/14/prompt-caching>)

Published: 2024-08-14T00:00:00Z

Content type: article

Language: en

Sources: [Tim Kellogg](<https://devfeed.tech/sources/tim-kellogg.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [cost](<https://devfeed.tech/tags/cost.md>), [rag](<https://devfeed.tech/tags/rag.md>), [vector](<https://devfeed.tech/tags/vector.md>)

## AI overview

The article explains Anthropic's prompt caching, including its higher cost when loading or invalidating a cache and substantially lower cost when reusing one. It argues that caching benefits workloads with static prompts, while replacing a vector store with an entire database in the prompt can be far more expensive.

## Source excerpt

Anthropic announced prompt caching today. How is it helpful? Does it replace RAG? Let's discuss.