.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, FaviconCacheConfig cfg) | |
None|tuple[None|bytes, None|str] | __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) | |
Public Member Functions inherited from searx.favicons.cache.FaviconCache |
A dummy favicon cache that caches nothing / a fallback solution. The NullCache is used when more efficient caches such as the :py:obj:`FaviconCacheSQLite` cannot be used because, for example, the SQLite library is only available in an old version and does not meet the requirements.
searx.favicons.cache.FaviconCacheNull.__init__ | ( | self, | |
FaviconCacheConfig | cfg ) |
An instance of the favicon cache is build up from the configuration.
Reimplemented from searx.favicons.cache.FaviconCache.
Definition at line 218 of file cache.py.
None | tuple[None | bytes, None | str] searx.favicons.cache.FaviconCacheNull.__call__ | ( | self, | |
str | resolver, | ||
str | authority ) |
Returns ``None`` or the tuple of ``(data, mime)`` that has been registered in the cache. The ``None`` indicates that there was no entry in the cache.
Reimplemented from searx.favicons.cache.FaviconCache.
Definition at line 221 of file cache.py.
searx.favicons.cache.FaviconCacheNull.maintenance | ( | self, | |
force = False ) |
Performs maintenance on the cache
Reimplemented from searx.favicons.cache.FaviconCache.
Definition at line 230 of file cache.py.
Referenced by searx.favicons.cache.FaviconCacheSQLite.set().
bool searx.favicons.cache.FaviconCacheNull.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 224 of file cache.py.
searx.favicons.cache.FaviconCacheNull.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 227 of file cache.py.