class_docstr: Stores/loads nodes `fitted_operation` field to increase performance of calculations.
  
  :param cache_dir: path to the place where cache files should be stored.
class_docstr_tok: ["Stores\/loads","nodes","`","fitted_operation","`","field","to","increase","performance","of","calculations",".",":","param","cache_dir",":","path","to","the","place","where","cache","files","should","be","stored","."]
docstr: :param nodes: node/nodes to be cached
  :param fold_id: optional part of cache item UID
                      (can be used to specify the number of CV fold)
docstr_tok: [":","param","nodes",":","node\/nodes","to","be","cached",":","param","fold_id",":","optional","part","of","cache","item","UID","(","can","be","used","to","specify","the","number","of","CV","fold",")"]
code: def save_nodes(
      self,
      nodes: Union[PipelineNode, List[PipelineNode]],
      fold_id: Optional[int] = None,
  ):
      """
      :param nodes: node/nodes to be cached
      :param fold_id: optional part of cache item UID
                          (can be used to specify the number of CV fold)
      """
      try:
          mapped = [
              (_get_structural_id(node, fold_id), node.fitted_operation)
              for node in ensure_wrapped_in_sequence(nodes)
              if node.fitted_operation is not None
          ]
          self._db.add_operations(mapped)
      except Exception as ex:
          unexpected_exc = not (
              isinstance(ex, sqlite3.DatabaseError)
              and "disk is full" in str(ex)
          )
          self.log.warning(
              f"Nodes can not be saved: {ex}. Continue",
              exc=ex,
              raise_if_test=unexpected_exc,
          )
  
file_path: FEDOT/fedot/core/caching/pipelines_cache.py
imports: import sqlite3
  from typing import List, Optional, TYPE_CHECKING, Union
  from golem.utilities.data_structures import ensure_wrapped_in_sequence
  from fedot.core.caching.base_cache import BaseCache
  from fedot.core.caching.pipelines_cache_db import OperationsCacheDB
  from fedot.core.pipelines.node import PipelineNode
label_desc: Use image node_id 2 for calling the OperationsCache obj's underlying member method code with example usage: obj.save_nodes(nodes, fold_id) without return types