authnzerver.cache module¶
This contains functions to drive the cache.
-
authnzerver.cache.
cache_add
(key, value, timeout_seconds=0.3, expires_seconds=None, cache_dirname='/tmp/authnzerver-cache')[source]¶ This sets a key to the value specified in the cache.
-
authnzerver.cache.
cache_decrement
(key, timeout_seconds=0.3, cache_dirname='/tmp/authnzerver-cache')[source]¶ This decrements the counter for key.
-
authnzerver.cache.
cache_delete
(key, timeout_seconds=0.3, cache_dirname='/tmp/authnzerver-cache')[source]¶ This sets a key to the value specified in the cache.
-
authnzerver.cache.
cache_flush
(timeout_seconds=0.3, cache_dirname='/tmp/authnzerver-cache')[source]¶ This removes all keys from the cache.
-
authnzerver.cache.
cache_get
(key, timeout_seconds=0.3, cache_dirname='/tmp/authnzerver-cache')[source]¶ This sets a key to the value specified in the cache.
-
authnzerver.cache.
cache_getrate
(key, timeout_seconds=0.3, cache_dirname='/tmp/authnzerver-cache')[source]¶ This gets the rate of increment for the key by looking at the time of insertion inserted at key and the number of times it was incremented in key-counter. The rate is then:
key-counter_val/((time_now - time_insertion)/60.0)