class_docstr: Class that implements LRU cache with expiring items.
  
  LRU caches remove items in a FIFO manner, such that the oldest
  items to be used are the first to be removed.
  If you attempt to retrieve a cache item that is older than the
  expiration time, the item will be invalidated.
class_docstr_tok: ["Class","that","implements","LRU","cache","with","expiring","items",".","LRU","caches","remove","items","in","a","FIFO","manner",",","such","that","the","oldest","items","to","be","used","are","the","first","to","be","removed",".","If","you","attempt","to","retrieve","a","cache","item","that","is","older","than","the","expiration","time",",","the","item","will","be","invalidated","."]
docstr: Returns value corresponding to key in cache and boolean indicating cache hit.
  
  Args:
      key (KeyType): Key in cache to retrieve.
      data_source_fallback (Optional[bool]): True if data should be retrieved if
          it's stale or not in cache. Default: True.
  
  Raises:
      KeyError: If key is not found in cache or is outdated and
      ``data_source_fallback`` is False.
docstr_tok: ["Returns","value","corresponding","to","key","in","cache","and","boolean","indicating","cache","hit",".","Args",":","key","(","KeyType",")",":","Key","in","cache","to","retrieve",".","data_source_fallback","(","Optional","[","bool","]",")",":","True","if","data","should","be","retrieved","if","it","'s","stale","or","not","in","cache",".","Default",":","True",".","Raises",":","KeyError",":","If","key","is","not","found","in","cache","or","is","outdated","and","``","data_source_fallback","``","is","False","."]
code: def get(
      self, key: KeyType, data_source_fallback: Optional[bool] = True
  ) -> Tuple[ValType, bool]:
      """Returns value corresponding to key in cache and boolean indicating cache hit.
  
      Args:
          key (KeyType): Key in cache to retrieve.
          data_source_fallback (Optional[bool]): True if data should be retrieved if
              it's stale or not in cache. Default: True.
  
      Raises:
          KeyError: If key is not found in cache or is outdated and
          ``data_source_fallback`` is False.
      """
      if data_source_fallback:
          if key in self._lru_cache:
              return self._get_item(key, False), True
          self.put(key)
          return self._get_item(key, False), False
      return self._get_item(key, True), True
  
file_path: sagemaker-python-sdk/src/sagemaker/utilities/cache.py
imports: from __future__ import absolute_import
  import datetime
  import collections
  from typing import Tuple, TypeVar, Generic, Callable, Optional
label_desc: Use image node_id 5 for calling the LRUCache obj's underlying member method code with example usage: obj.get(key, data_source_fallback) and returns: self,  True, self,  False, self,  True