LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
Pythonlangsmithprompt_cacheCacheEntry
Class●Since v0.7

CacheEntry

A single cache entry with metadata for TTL tracking.

Copy
CacheEntry(
  self,
  value: Any,
  created_at: float,
  refresh_func: Optional[Callable[[], Any]] = None
)

Constructors

constructor
__init__
NameType
valueAny
created_atfloat
refresh_funcOptional[Callable[[], Any]]

Attributes

attribute
value: Any
attribute
created_at: float
attribute
refresh_func: Optional[Callable[[], Any]]

Methods

method
is_stale

Check if entry is past its TTL (needs refresh).

View source on GitHub