class_docstr: Stores training results in a persistent cache.
  
  Used to minimize re-retraining when the data / config didn't change in between
  training runs.
class_docstr_tok: ["Stores","training","results","in","a","persistent","cache",".","Used","to","minimize","re-retraining","when","the","data","\/","config","did","n't","change","in","between","training","runs","."]
docstr: Adds the output to the cache.
  
  If the output is of type `Cacheable` the output is persisted to disk in addition
  to its fingerprint.
  
  Args:
      fingerprint_key: The fingerprint key serves as key for the cache. Graph
          components can use their fingerprint key to lookup fingerprints of
          previous training runs.
      output: The output. The output is only cached to disk if it's of type
          `Cacheable`.
      output_fingerprint: The fingerprint of their output. This can be used
          to lookup potentially persisted outputs on disk.
      model_storage: Required for caching `Resource` instances. E.g. `Resource`s
          use that to copy data from the model storage to the cache.
docstr_tok: ["Adds","the","output","to","the","cache",".","If","the","output","is","of","type","`","Cacheable","`","the","output","is","persisted","to","disk","in","addition","to","its","fingerprint",".","Args",":","fingerprint_key",":","The","fingerprint","key","serves","as","key","for","the","cache",".","Graph","components","can","use","their","fingerprint","key","to","lookup","fingerprints","of","previous","training","runs",".","output",":","The","output",".","The","output","is","only","cached","to","disk","if","it","'s","of","type","`","Cacheable","`",".","output_fingerprint",":","The","fingerprint","of","their","output",".","This","can","be","used","to","lookup","potentially","persisted","outputs","on","disk",".","model_storage",":","Required","for","caching","`","Resource","`","instances",".","E.g",".","`","Resource","`","s","use","that","to","copy","data","from","the","model","storage","to","the","cache","."]
code: def cache_output(
      self,
      fingerprint_key: Text,
      output: Any,
      output_fingerprint: Text,
      model_storage: ModelStorage,
  ) -> None:
      """Adds the output to the cache.
  
      If the output is of type `Cacheable` the output is persisted to disk in addition
      to its fingerprint.
  
      Args:
          fingerprint_key: The fingerprint key serves as key for the cache. Graph
              components can use their fingerprint key to lookup fingerprints of
              previous training runs.
          output: The output. The output is only cached to disk if it's of type
              `Cacheable`.
          output_fingerprint: The fingerprint of their output. This can be used
              to lookup potentially persisted outputs on disk.
          model_storage: Required for caching `Resource` instances. E.g. `Resource`s
              use that to copy data from the model storage to the cache.
      """
  
imports: from __future__ import annotations
  import abc
  import logging
  import os
  import shutil
  from datetime import datetime
  from pathlib import Path
  from typing import Text, Any, Optional, Tuple, List
  from packaging import version
  from sqlalchemy.engine import URL
  from sqlalchemy.exc import OperationalError
  from typing_extensions import Protocol, runtime_checkable
  import rasa
  import rasa.model
  import rasa.utils.common
  import rasa.shared.utils.common
  from rasa.constants import MINIMUM_COMPATIBLE_VERSION
  import sqlalchemy
  import sqlalchemy.orm
  from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta
  from rasa.engine.storage.storage import ModelStorage
label_desc: Use image node_id 1 for calling the TrainingCache obj's underlying member method code with example usage: obj.cache_output(fingerprint_key, output, output_fingerprint, model_storage) without return types