.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.cache.ExpireCacheCfg Class Reference
+ Inheritance diagram for searx.cache.ExpireCacheCfg:
+ Collaboration diagram for searx.cache.ExpireCacheCfg:

Public Member Functions

 __post_init__ (self)
 

Static Public Attributes

str db_url = ""
 
int MAX_VALUE_LEN = 1024 * 10
 
int MAXHOLD_TIME = 60 * 60 * 24 * 7
 
int MAINTENANCE_PERIOD = 60 * 60
 
typing MAINTENANCE_MODE = "auto"
 
bytes password = get_setting("server.secret_key").encode()
 

Detailed Description

Configuration of a :py:obj:`ExpireCache` cache.

Definition at line 34 of file cache.py.

Member Function Documentation

◆ __post_init__()

searx.cache.ExpireCacheCfg.__post_init__ ( self)

Definition at line 75 of file cache.py.

75 def __post_init__(self):
76 # if db_url is unset, use a default DB in /tmp/sxng_cache_{name}.db
77 if not self.db_url:
78 self.db_url = tempfile.gettempdir() + os.sep + f"sxng_cache_{ExpireCache.normalize_name(self.name)}.db"
79
80
81@dataclasses.dataclass

References db_url.

Member Data Documentation

◆ db_url

str searx.cache.ExpireCacheCfg.db_url = ""
static

◆ MAINTENANCE_MODE

typing searx.cache.ExpireCacheCfg.MAINTENANCE_MODE = "auto"
static

Definition at line 54 of file cache.py.

◆ MAINTENANCE_PERIOD

int searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD = 60 * 60
static

Definition at line 50 of file cache.py.

◆ MAX_VALUE_LEN

int searx.cache.ExpireCacheCfg.MAX_VALUE_LEN = 1024 * 10
static

Definition at line 44 of file cache.py.

◆ MAXHOLD_TIME

int searx.cache.ExpireCacheCfg.MAXHOLD_TIME = 60 * 60 * 24 * 7
static

Definition at line 47 of file cache.py.

◆ password

bytes searx.cache.ExpireCacheCfg.password = get_setting("server.secret_key").encode()
static

Definition at line 66 of file cache.py.


The documentation for this class was generated from the following file: