cache.cpython-311.pyc•10.5 kB
�
÷�g� � � � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl
mZmZm
Z
mZmZmZ ddlmZ ej e� � Z ed � � Ze G d
� dee � � � � Z G d� d
� � Z e� � Zdd�Zddd�ZdS )aW
Thread-safe in-memory cache implementation with TTL support.
This module provides a simple but robust caching mechanism with the following features:
- Thread-safe operations
- TTL (Time To Live) support
- Automatic cleanup of expired entries
- Capacity management to prevent memory leaks
- Decorator support for easy function result caching
� )�annotationsN)� dataclass��wraps)�Dict�Any�Optional�TypeVar�Generic�Callable� )�config�Tc �( � e Zd ZU dZded<