.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, cfg) | |
None|tuple[bytes|None, str|None] | __call__ (self, str resolver, str authority) |
bool | set (self, str resolver, str authority, str|None mime, bytes|None data) |
state (self) | |
maintenance (self, force=False) | |
![]() | |
__init__ (self, FaviconCacheConfig cfg) | |
None|tuple[None|bytes, None|str] | __call__ (self, str resolver, str authority) |
Public Attributes | |
cfg = cfg | |
Protected Attributes | |
dict | _data = {} |
dict | _sha_mime = {} |
Favicon cache in process' memory. Its just a POC that stores the favicons in the memory of the process. .. attention:: Don't use it in production, it will blow up your memory!!
searx.favicons.cache.FaviconCacheMEM.__init__ | ( | self, | |
cfg ) |
None | tuple[bytes | None, str | None] searx.favicons.cache.FaviconCacheMEM.__call__ | ( | self, | |
str | resolver, | ||
str | authority ) |
Definition at line 443 of file cache.py.
searx.favicons.cache.FaviconCacheMEM.maintenance | ( | self, | |
force = False ) |
Performs maintenance on the cache
Reimplemented from searx.favicons.cache.FaviconCache.
Definition at line 475 of file cache.py.
bool searx.favicons.cache.FaviconCacheMEM.set | ( | self, | |
str | resolver, | ||
str | authority, | ||
str | None | mime, | ||
bytes | None | data ) |
Set data and mime-type in the cache. If data is None, the :py:obj:`FALLBACK_ICON` is registered. in the cache.
Reimplemented from searx.favicons.cache.FaviconCache.
Definition at line 453 of file cache.py.
searx.favicons.cache.FaviconCacheMEM.state | ( | self | ) |
Returns a :py:obj:`FaviconCacheStats` (key/values) with information on the state of the cache.
Reimplemented from searx.favicons.cache.FaviconCache.
Definition at line 472 of file cache.py.
References _data.
|
protected |
Definition at line 440 of file cache.py.
Referenced by __call__(), set(), and state().
|
protected |
Definition at line 441 of file cache.py.
Referenced by __call__(), and set().