class_docstr: Caches training results on local disk (see parent class for full docstring).
class_docstr_tok: ["Caches","training","results","on","local","disk","(","see","parent","class","for","full","docstring",")","."]
code: def _drop_least_recently_used_item(self) -> None:
      with self._sessionmaker.begin() as session:
          query_for_least_recently_used_entry = sa.select(
              self.CacheEntry
          ).order_by(self.CacheEntry.last_used.asc())
          oldest_cache_item = (
              session.execute(query_for_least_recently_used_entry)
              .scalars()
              .first()
          )
  
          if not oldest_cache_item:
              self._purge_cache_dir_content()
              return
  
          self._delete_cached_result(oldest_cache_item)
          delete_query = sa.delete(self.CacheEntry).where(
              self.CacheEntry.fingerprint_key
              == oldest_cache_item.fingerprint_key
          )
          session.execute(delete_query)
  
          logger.debug(
              f"Deleted item with fingerprint "
              f"'{oldest_cache_item.fingerprint_key}' to free space."
          )
  
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 12 for calling the LocalTrainingCache obj's underlying member method code with example usage: obj._drop_least_recently_used_item() without return types