Cache

class rundeck_resources.cache.Cache(config, no_cache)[source]

A cache module the plugins can take advantage of in case the APIs do not return data or the server is down.

cache(plugin, resources)[source]

Method to cache plugin data.

Parameters:
  • plugin (str) – The plugin name to cache data for.
  • resources (dict) – The resources data to cache.
Return type:

None

invalidate(plugin)[source]

Method to invalidate a plugin cache file.

Parameters:plugin (str) – The plugin name to invalidate the cache file for.
Return type:None
load_cache(config)[source]

Method to search for all configured plugins cache files

Parameters:config (dict) – the configuration provided by config.read_config.
Return type:dict
Returns:The cache configuration that includes paths to all plugin cache files.
static translate_to_filename(plugin_name)[source]

Static method to translate the plugin name to a standard prefix that could be used in a standard matter in the Cache class.

Parameters:plugin_name (str) – The plugin to translate the name for.
Return type:str
Returns:The translated plugin name.
uncache(plugin)[source]

Method to read cached data for a specific plugin.

Parameters:plugin (str) – The plugin to read cached data for.
Raises:CacheNotFound
Return type:dict