set¶
-
privex.helpers.cache.
set
(key: str, value: Any, timeout: Optional[int] = 300)[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).