This commit is contained in:
Nuno Campos
2025-05-08 16:57:21 -07:00
parent c937d5f048
commit 83d2f93566
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -5,13 +5,12 @@ import datetime
import sqlite3
import threading
from collections.abc import Mapping, Sequence
from typing import Generic
from langgraph.cache.base import BaseCache, FullKey, Namespace, ValueT
from langgraph.checkpoint.serde.base import SerializerProtocol
class SqliteCache(BaseCache[ValueT], Generic[ValueT]):
class SqliteCache(BaseCache[ValueT]):
"""File-based cache using SQLite."""
def __init__(
+1 -2
View File
@@ -3,13 +3,12 @@ from __future__ import annotations
import datetime
import threading
from collections.abc import Mapping, Sequence
from typing import Generic
from langgraph.cache.base import BaseCache, FullKey, Namespace, ValueT
from langgraph.checkpoint.serde.base import SerializerProtocol
class InMemoryCache(BaseCache[ValueT], Generic[ValueT]):
class InMemoryCache(BaseCache[ValueT]):
def __init__(self, *, serde: SerializerProtocol | None = None):
super().__init__(serde=serde)
self._cache: dict[Namespace, dict[str, tuple[str, bytes, float | None]]] = {}