Redis Cache
Bases: CacheStrategy
Cache data to Redis as a CSV string
get_data(key)
Return data, settings from cache if exists.
PARAMETER | DESCRIPTION |
---|---|
key
|
The cache key to retrieve the data.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ChartData | None
|
ChartData or None if not found. |
invalidate(key)
Remove data from cache.
PARAMETER | DESCRIPTION |
---|---|
key
|
The cache key to invalidate.
TYPE:
|
set_data(key, data)
Serialize and store DataFrame, settings, and column names in Redis.
PARAMETER | DESCRIPTION |
---|---|
key
|
The cache key to store the data.
TYPE:
|
data
|
The ChartData to be stored.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
Exception
|
If failed to save data to Redis. |