CacheClient
CacheClient
¶
CacheClient(table_name: str)
Bases: BaseClient
Client for caching data in memory, using the Singleton pattern.
This client stores data in a simple in-memory dictionary (_cache_data
).
It implements the BaseClient
interface for common database operations,
simulating database interactions by operating on the in-memory cache.
This class is designed for testing. It is NOT suitable for production environments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table_name
|
str
|
The name of the table associated with the cache.
While the table name isn't directly used for in-memory
operations, it's stored for consistency with the
|
required |
Source code in supadantic/clients/cache.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|