mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-24 08:32:24 +02:00
Remove refresh
This commit is contained in:
@@ -610,7 +610,6 @@ def prepare_single_task(
|
||||
args_key.encode() if isinstance(args_key, str) else args_key,
|
||||
),
|
||||
cache_policy.ttl,
|
||||
cache_policy.refresh,
|
||||
)
|
||||
else:
|
||||
cache_key = None
|
||||
@@ -734,7 +733,6 @@ def prepare_single_task(
|
||||
args_key.encode() if isinstance(args_key, str) else args_key,
|
||||
),
|
||||
cache_policy.ttl,
|
||||
cache_policy.refresh,
|
||||
)
|
||||
else:
|
||||
cache_key = None
|
||||
@@ -869,7 +867,6 @@ def prepare_single_task(
|
||||
else args_key,
|
||||
),
|
||||
cache_policy.ttl,
|
||||
cache_policy.refresh,
|
||||
)
|
||||
else:
|
||||
cache_key = None
|
||||
|
||||
@@ -1071,7 +1071,7 @@ class SyncPregelLoop(PregelLoop, AbstractContextManager):
|
||||
if cached := {
|
||||
(t.cache_key.ns, t.cache_key.key): t
|
||||
for t in self.tasks.values()
|
||||
if t.cache_key and not t.cache_key.refresh and not t.writes
|
||||
if t.cache_key and not t.writes
|
||||
}:
|
||||
for key, values in self.cache.get(tuple(cached)).items():
|
||||
task = cached[key]
|
||||
@@ -1260,7 +1260,7 @@ class AsyncPregelLoop(PregelLoop, AbstractAsyncContextManager):
|
||||
if cached := {
|
||||
(t.cache_key.ns, t.cache_key.key): t
|
||||
for t in self.tasks.values()
|
||||
if t.cache_key and not t.cache_key.refresh and not t.writes
|
||||
if t.cache_key and not t.writes
|
||||
}:
|
||||
for key, values in (await self.cache.aget(tuple(cached))).items():
|
||||
task = cached[key]
|
||||
|
||||
@@ -137,9 +137,6 @@ class CachePolicy(Generic[KeyFuncT]):
|
||||
ttl: Optional[int] = None
|
||||
"""Time to live for the cache entry in seconds. If None, the entry never expires."""
|
||||
|
||||
refresh: bool = False
|
||||
"""Whether to force a refresh of the cache entry when it is accessed."""
|
||||
|
||||
|
||||
@dataclasses.dataclass(**_DC_KWARGS)
|
||||
class Interrupt:
|
||||
@@ -193,8 +190,6 @@ class CacheKey(NamedTuple):
|
||||
"""Key for the cache entry."""
|
||||
ttl: Optional[int]
|
||||
"""Time to live for the cache entry in seconds."""
|
||||
refresh: bool
|
||||
"""Whether to force a refresh of the cache entry when it is accessed."""
|
||||
|
||||
|
||||
@dataclasses.dataclass(**_T_DC_KWARGS)
|
||||
|
||||
Reference in New Issue
Block a user