LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Traceable
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerTraceableJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithutilsprompt_cacheconfigureGlobalPromptCache
Function●Since v0.7

configureGlobalPromptCache

Configure the global prompt cache.

This should be called before any cache instances are created.

Copy
configureGlobalPromptCache(config: CacheConfig)

Used in Docs

  • Manage prompts programmatically

Parameters

NameTypeDescription
config*CacheConfig

Cache configuration options

Example

Copy
import { configureGlobalPromptCache } from 'langsmith';

configureGlobalPromptCache({ maxSize: 200, ttlSeconds: 7200 });
View source on GitHub