
    @'h*                        d dl mZ d dlmZmZ d dlmZ d dlmZm	Z	m
Z
 d dlmZ d dlmZ  e
d      Zeedf   Zeeef   Z G d	 d
eee         Zy)    )annotations)ABCabstractmethod)Mapping)GenericSequenceTypeVar)SerializerProtocol)JsonPlusSerializerValueT.c                      e Zd ZU dZ ed      Zded<   ddddZedd	       Z	edd
       Z
edd       Zedd       Zeddd       Zeddd       Zy)	BaseCachezBase class for a cache.T)pickle_fallbackr
   serdeNr   c               .    |xs | j                   | _         y)z'Initialize the cache with a serializer.Nr   )selfr   s     d/home/kushmeetdev/Regenta/Chatbot/venv/lib/python3.12/site-packages/langgraph/cache/base/__init__.py__init__zBaseCache.__init__   s    (djj
    c                     y)z)Get the cached values for the given keys.N r   keyss     r   getzBaseCache.get       r   c                   K   yw)z8Asynchronously get the cached values for the given keys.Nr   r   s     r   agetzBaseCache.aget           c                     y)z2Set the cached values for the given keys and TTLs.Nr   r   pairss     r   setzBaseCache.set    r   r   c                   K   yw)zAAsynchronously set the cached values for the given keys and TTLs.Nr   r"   s     r   asetzBaseCache.aset$   r   r    c                     y)zrDelete the cached values for the given namespaces.
        If no namespaces are provided, clear all cached values.Nr   r   
namespacess     r   clearzBaseCache.clear(   r   r   c                   K   yw)zAsynchronously delete the cached values for the given namespaces.
        If no namespaces are provided, clear all cached values.Nr   r(   s     r   aclearzBaseCache.aclear-   r   r    )r   zSerializerProtocol | NonereturnNone)r   zSequence[FullKey]r-   zdict[FullKey, ValueT])r#   z+Mapping[FullKey, tuple[ValueT, int | None]]r-   r.   )N)r)   zSequence[Namespace] | Noner-   r.   )__name__
__module____qualname____doc__r   r   __annotations__r   r   r   r   r$   r&   r*   r,   r   r   r   r   r      s    ! 24 HEH=A ) 8 8 G G A A P P C C C Cr   r   N)
__future__r   abcr   r   collections.abcr   typingr   r   r	   langgraph.checkpoint.serde.baser
   #langgraph.checkpoint.serde.jsonplusr   r   tuplestr	NamespaceFullKeyr   r   r   r   <module>r>      sS    " # # - - > B		#s(O	
	3
!CWV_ !Cr   