o
    h                     @  s   d dl 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mZmZ d dlmZ er:d dlmZ d dlmZ d#ddZd$ddZd%ddZeddZed dZeZg d!Zd"S )&    )annotations)TYPE_CHECKING)CACHE_DATA_MESSAGE_REPLAY_CTXCacheDataAPIget_data_cache_stats_provider)CACHE_DOCS_URL)!CACHE_RESOURCE_MESSAGE_REPLAY_CTXCacheResourceAPI!get_resource_cache_stats_provider)cache)Message)Block
delta_typestrelement_protor   invoked_dg_id
used_dg_idreturned_dg_idreturnNonec                 C  s(   t | |||| t| |||| dS )zSave the message for an element to a thread-local callstack, so it can
    be used later to replay the element when a cache-decorated function's
    execution is skipped.
    N)r   save_element_messager   )r   r   r   r   r    r   V/var/www/vscode/kcb/lib/python3.10/site-packages/streamlit/runtime/caching/__init__.pyr   &   s   

r   block_protor   c                 C  s$   t | ||| t| ||| dS )zSave the message for a block to a thread-local callstack, so it can
    be used later to replay the block when a cache-decorated function's
    execution is skipped.
    N)r   save_block_messager   )r   r   r   r   r   r   r   r   9   s   
r   
image_databytes | strmimetypeimage_idc                 C  s    t | || t| || d S )N)r   save_image_datar   )r   r   r   r   r   r   save_media_dataK   s   r    
cache_data)decorator_metric_namecache_resource)	r   r   r   r   r    r   r
   r!   r#   N)r   r   r   r   r   r   r   r   r   r   r   r   )
r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   )
__future__r   typingr   (streamlit.runtime.caching.cache_data_apir   r   r   &streamlit.runtime.caching.cache_errorsr   ,streamlit.runtime.caching.cache_resource_apir   r	   r
   *streamlit.runtime.caching.legacy_cache_apir   _cachegoogle.protobuf.messager   streamlit.proto.Block_pb2r   r   r   r    r!   r#   __all__r   r   r   r   <module>   s    




