summaryrefslogtreecommitdiff
path: root/searx/cache.py
AgeCommit message (Collapse)Author
2026-07-17[fix] cache: maintenance period comment duration 2h instead of 1hBnyro
2026-07-16[fix] engine cache: return default value when cache entry expiredBnyro
It's possible that it's expired but has not yet been automatically deleted by the periodic maintenance because that, by default, runs only every 2 hours. Related: - see https://github.com/searxng/searxng/pull/6409#discussion_r3584712601
2026-06-10[fix] sqlitedb: create DB Schema (DDL) during app initialization (hardening) ↵Markus Heiser
(#6187) The initialization of the DB schema ("base schema") has so far been done on demand, which causes race conditions with competing threads and processes. The DDL statements for creating the "base schema" are now executed as part of the initialization of the app. Further improvements were made to harden the database applications: - Wikidata & Radio-Browser engine perform their initialization only once (so far the initialization was carried out in each thread/process). - If multiple processes try to set DB's WAL mode when opening the DB at the same time, this usually leads to another race condition, which is now also caught. Related: - https://github.com/searxng/searxng/issues/6181#issuecomment-4586705 Closes: #6181 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2026-05-15[fix] engine wikidata - fails to initialize with HTTP 403 (#6081)Markus Heiser
In order not to be further blocked, the WIKIDATA_PROPERTIES are cached, which drastically reduces the WD-SQL request. BTW: improve type hints Closes: https://github.com/searxng/searxng/issues/6051 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-28Revert "[fix:py3.14] Struct fields aren't discovered in Python 3.14"Markus Heiser
This reverts commit 8fdc59a7604cd661638586ff0381530da86eb76c.
2025-10-08[fix:py3.14] Struct fields aren't discovered in Python 3.14Markus Heiser
This is a temporary workaround for #5284 [1]. However, the problem must be solved at a different level, in msgspec [2]. [1] https://github.com/searxng/searxng/issues/5284 [2] https://github.com/jcrist/msgspec/issues/847 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-28[mod] ExpireCacheSQLite - implement .setmany() for bulk loadingMarkus Heiser
[1] https://github.com/searxng/searxng/issues/5223#issuecomment-3328597147 Suggested-by: Ivan G <igabaldon@inetol.net> [1] Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-03[mod] drop: from __future__ import annotationsMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-03[mod] addition of various type hints / tbcMarkus Heiser
- pyright configuration [1]_ - stub files: types-lxml [2]_ - addition of various type hints - enable use of new type system features on older Python versions [3]_ - ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_: Older versions typically lack some typing features found in newer Python versions. Therefore, for local type checking (before commit), it is necessary to use the older Python interpreter. .. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/ .. [2] https://pypi.org/project/types-lxml/ .. [3] https://typing-extensions.readthedocs.io/en/latest/# .. [4] https://mise.jdx.dev/configuration.html#tool-versions Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Format: reST
2025-06-23[mod] data: implement a simple tracker URL (SQL) databaseMarkus Heiser
On demand, the tracker data is loaded directly into the cache, so that the maintenance of this data via PRs is no longer necessary. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-31[mod] weather results: add types, i18n/l10n, symbols & unit conversionsMarkus Heiser
The types necessary for weather information such as GeoLocation, DateTime, Temperature,Pressure, WindSpeed, RelativeHumidity, Compass (wind direction) and symbols for the weather have been implemented. There are unit conversions and translations for weather property labels. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-20[chore] fix some docstring typos (#4815)Jost Alemann
2025-05-03[fix] cache.ExpireCache: definition of a context name for the keyMarkus Heiser
The definition of a context name belongs in the abstract base class (was previously only in the concrete implementation for the SQLite adapter). Suggested-by: @dalf https://github.com/searxng/searxng/pull/4650#discussion_r2069873853 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03[fix] (armv7) cache.ExpireCache: remove option ENCRYPT_VALUEMarkus Heiser
Prophylactic encryption of the value currently makes no sense; on the contrary, since the ``cryptography`` package is not available on armv7, it would cause further problems. Suggested-by: @dalf https://github.com/searxng/searxng/pull/4650#issuecomment-2830786661 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03[mod] ExpireCache - sqlite based key/value cache with expire timeMarkus Heiser