airflow.secrets.cache
¶
Module Contents¶
Classes¶
A static class to manage the global secret cache. |
- class airflow.secrets.cache.SecretCache[source]¶
A static class to manage the global secret cache.
- classmethod init()[source]¶
Initialize the cache, provided the configuration allows it.
Safe to call several times.
- classmethod get_variable(key)[source]¶
Try to get the value associated with the key from the cache.
- Returns
The saved value (which can be None) if present in cache and not expired, a NotPresent exception otherwise.
- Return type
str | None
- classmethod get_connection_uri(conn_id)[source]¶
Try to get the uri associated with the conn_id from the cache.
- Returns
The saved uri if present in cache and not expired, a NotPresent exception otherwise.
- Return type
- classmethod save_variable(key, value)[source]¶
Save the value for that key in the cache, if initialized.