1234567891011121314151617181920212223242526272829 |
- from __future__ import annotations
- import pathlib
- from searx import logger
- from searx.cache import ExpireCacheCfg, ExpireCacheSQLite
- log = logger.getChild("data")
- data_dir = pathlib.Path(__file__).parent
- _DATA_CACHE: ExpireCacheSQLite = None
- def get_cache():
- global _DATA_CACHE
- if _DATA_CACHE is None:
- _DATA_CACHE = ExpireCacheSQLite.build_cache(
- ExpireCacheCfg(
- name="DATA_CACHE",
-
-
- )
- )
- return _DATA_CACHE
|