Key/value cache for use inside LangGraph deployments.
Thin wrapper around langgraph_api.cache.
Values must be JSON-serializable (dicts, lists, strings, numbers, booleans,
None).
Get a value from the cache.
Returns the deserialized value, or None if the key is missing or expired.
Requires Agent Server runtime version 0.7.29 or later.
Set a value in the cache.
Load a cached value using stale-while-revalidate semantics.
This helper is server-side only and is intended for caching internal async dependencies such as auth or metadata lookups.
Result wrapper returned by :func:swr.