7.2.4.2. Module axivion.dashboard.visualization.cache_config

Classes

CacheConfig(*[, additional_files, across_users])

Declares the caching configuration of a visualization module.

CacheConfig

class axivion.dashboard.visualization.cache_config.CacheConfig(*, additional_files=(), across_users=False)

Bases: object

Declares the caching configuration of a visualization module.

By design, visualization modules themselves (i.e., the script file which is responsible for generating an artifact) are always tracked for modifications if a CacheConfig object is supplied. If a modification is detected by the visualization framework (i.e., the visualization framework found that the contents of a script file have been changed), the corresponding cache entry is invalidated and the visualization artifact is re-generated. Additional files to be tracked can be specified with the additional_files argument.

Parameters:
  • additional_files (typing.Tuple[typing.Union[str, os.PathLike], ...]) – Additional files that are explicitly or implicitly used by the module (e.g., Vega spec files, common Python libs etc.). If one of the files listed is modified (i.e., its contents have been changed), the artifact caches assigned to the module are invalidated. The default is an empty tuple. Files can be specified with both relative (relative to the path of the visualization module script) and absolute paths.

  • across_users (bool) – Indicates whether the artifacts generated by the module are specific to the user calling the visualization framework (e.g., via the Dashboard portal). For instance, if a module processes the list of issues related to the calling user, each user obtains their own specific visualization artifact which needs to be cached independently from all other artifacts created by this module. If True, artifacts are cached for each user individually. If False, artifacts are cached among all users—obviously, non-user specific caching requires less memory and is therefore to be preferred if feasible. The default is False.

as_dict()

Returns a dict representation of the cache config.

Return type:

typing.Mapping[str, typing.Any]