class_docstr: Cache storage that persists data to disk
  This is the default cache persistence layer for `@st.cache_data`
class_docstr_tok: ["Cache","storage","that","persists","data","to","disk","This","is","the","default","cache","persistence","layer","for","`","@","st.cache_data","`"]
docstr: Returns the stored value for the key if persisted,
  raise CacheStorageKeyNotFoundError if not found, or not configured
  with persist="disk"
docstr_tok: ["Returns","the","stored","value","for","the","key","if","persisted",",","raise","CacheStorageKeyNotFoundError","if","not","found",",","or","not","configured","with","persist=","''","disk","''"]
code: def get(self, key: str) -> bytes:
      """
      Returns the stored value for the key if persisted,
      raise CacheStorageKeyNotFoundError if not found, or not configured
      with persist="disk"
      """
      if self.persist == "disk":
          path = self._get_cache_file_path(key)
          try:
              with streamlit_read(path, binary=True) as input:
                  value = input.read()
                  _LOGGER.debug("Disk cache HIT: %s", key)
                  return bytes(value)
          except FileNotFoundError:
              raise CacheStorageKeyNotFoundError(
                  "Key not found in disk cache"
              )
          except Exception as ex:
              _LOGGER.error(ex)
              raise CacheStorageError(
                  "Unable to read from cache"
              ) from ex
      else:
          raise CacheStorageKeyNotFoundError(
              f"Local disk cache storage is disabled (persist={self.persist})"
          )
  
imports: from __future__ import annotations
  import math
  import os
  import shutil
  from streamlit import util
  from streamlit.file_util import get_streamlit_file_path, streamlit_read, streamlit_write
  from streamlit.logger import get_logger
  from streamlit.runtime.caching.storage.cache_storage_protocol import CacheStorage, CacheStorageContext, CacheStorageError, CacheStorageKeyNotFoundError, CacheStorageManager
  from streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper import InMemoryCacheStorageWrapper
label_desc: Use image node_id 4 for calling the LocalDiskCacheStorage obj's underlying member method code with example usage: obj.get(key) and returns: bytes