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: Returns effectiveness of the cache in case of enabled `use_stats`, None instead.
docstr_tok: ["Returns","effectiveness","of","the","cache","in","case","of","enabled","`","use_stats","`",",","None","instead","."]
code: def get_effectiveness(self) -> Optional[Tuple[int, int, int, int]]:
      """
      Returns effectiveness of the cache in case of enabled `use_stats`, None instead.
      """
      if self.use_stats:
          with closing(sqlite3.connect(self.db_path)) as conn:
              with conn:
                  cur = conn.cursor()
                  cur.execute(
                      f'SELECT {",".join(self._effectiveness_keys)} FROM {self._eff_table};'
                  )
                  return cur.fetchone()
  
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 2 for calling the BaseCacheDB obj's underlying member method code with example usage: obj.get_effectiveness() and returns: cur