set¶
-
async
AsyncSqliteCache.
set
(key: str, value: T, timeout: Optional[Union[decimal.Decimal, int, float]] = 300, _auto_purge=True) → T[source]¶ Set the cache key
key
to the valuevalue
, and automatically expire the key aftertimeout
seconds from now.If
timeout
isNone
, then the key will never expire (unless the cache implementation loses it’s persistence, e.g. memory caches with no disk writes).