class_docstr: Base class for caching in database.
  Includes low-level idea of caching data using relational database.
  
  :param main_table: table to store into or load from
  :param cache_dir: path to the place where cache files should be stored.
  :param use_stats: bool indicating if it is needed to use cache performance dict
  :param stats_keys: sequence of keys for supporting cache effectiveness
class_docstr_tok: ["Base","class","for","caching","in","database",".","Includes","low-level","idea","of","caching","data","using","relational","database",".",":","param","main_table",":","table","to","store","into","or","load","from",":","param","cache_dir",":","path","to","the","place","where","cache","files","should","be","stored",".",":","param","use_stats",":","bool","indicating","if","it","is","needed","to","use","cache","performance","dict",":","param","stats_keys",":","sequence","of","keys","for","supporting","cache","effectiveness"]
docstr: Deletes previously generated unused DB files.
docstr_tok: ["Deletes","previously","generated","unused","DB","files","."]
code: def _del_prev_temps(self):
      """
      Deletes previously generated unused DB files.
      """
      for file in self.db_path.glob(f"cache_*{self._db_suffix}"):
          try:
              pid = int(file.stem.split("_")[-1])
          except ValueError:
              pid = (
                  -1
              )  # old format cache name, remove this line somewhere in the future
          if pid not in psutil.pids():
              try:
                  file.unlink()
              except FileNotFoundError:
                  pass  # it means another process have already killed it
              except PermissionError:
                  pass
  
file_path: FEDOT/fedot/core/caching/base_cache_db.py
imports: import os
  import sqlite3
  from contextlib import closing
  from pathlib import Path
  from typing import Optional, Sequence, Tuple
  import psutil
  from fedot.core.utils import default_fedot_data_dir
label_desc: Use image node_id 6 for calling the BaseCacheDB obj's underlying member method code with example usage: obj._del_prev_temps() without return types