class_docstr: Attach SmartCache logic to the engine in Ignite.
  Mainly include the `start`, `update_cache`, and `shutdown` functions of SmartCacheDataset.
class_docstr_tok: ["Attach","SmartCache","logic","to","the","engine","in","Ignite",".","Mainly","include","the","`","start","`",",","`","update_cache","`",",","and","`","shutdown","`","functions","of","SmartCacheDataset","."]
docstr: Args:
      smartcacher: predefined SmartCacheDataset, will attach it to the engine.
  
  Raises:
      TypeError: When ``smartcacher`` is not a ``monai.data.SmartCacheDataset``.
docstr_tok: ["Args",":","smartcacher",":","predefined","SmartCacheDataset",",","will","attach","it","to","the","engine",".","Raises",":","TypeError",":","When","``","smartcacher","``","is","not","a","``","monai.data.SmartCacheDataset","``","."]
code: def __init__(self, smartcacher: SmartCacheDataset) -> None:
      """
      Args:
          smartcacher: predefined SmartCacheDataset, will attach it to the engine.
  
      Raises:
          TypeError: When ``smartcacher`` is not a ``monai.data.SmartCacheDataset``.
  
      """
      if not isinstance(smartcacher, SmartCacheDataset):
          raise TypeError(
              "smartcacher must be a monai.data.SmartCacheDataset."
          )
      self.smartcacher = smartcacher
  
file_path: MONAI/monai/handlers/smartcache_handler.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from monai.config import IgniteInfo
  from monai.data import SmartCacheDataset
  from monai.utils import min_version, optional_import
label_desc: Use image node_id 1 to create a new SmartCacheHandler object  with example: obj = SmartCacheHandler(smartcacher)