
The EngineCache class replaces all previously individual solutions for caches in the context of the engines. - demo_offline.py - duckduckgo.py - radio_browser.py - soundcloud.py - startpage.py - wolframalpha_api.py - wolframalpha_noapi.py Search term to test most of the modified engines:: !ddg !rb !sc !sp !wa test !ddg !rb !sc !sp !wa foo For introspection of the DB, jump into developer environment and run command to show cache state:: $ ./manage pyenv.cmd bash --norc --noprofile (py3) python -m searx.enginelib cache state cache tables and key/values =========================== [demo_offline ] 2025-04-22 11:32:50 count --> (int) 4 [startpage ] 2025-04-22 12:32:30 SC_CODE --> (str) fSOBnhEMlDfE20 [duckduckgo ] 2025-04-22 12:32:31 4dff493e.... --> (str) 4-128634958369380006627592672385352473325 [duckduckgo ] 2025-04-22 12:40:06 3e2583e2.... --> (str) 4-263126175288871260472289814259666848451 [radio_browser ] 2025-04-23 11:33:08 servers --> (list) ['https://de2.api.radio-browser.info', ...] [soundcloud ] 2025-04-29 11:40:06 guest_client_id --> (str) EjkRJG0BLNEZquRiPZYdNtJdyGtTuHdp [wolframalpha ] 2025-04-22 12:40:06 code --> (str) 5aa79f86205ad26188e0e26e28fb7ae7 number of tables: 6 number of key/value pairs: 7 In the "cache tables and key/values" section, the table name (engine name) is at first position on the second there is the calculated expire date and on the third and fourth position the key/value is shown. About duckduckgo: The *vqd coode* of ddg depends on the query term and therefore the key is a hash value of the query term (to not to store the raw query term). In the "properties of ENGINES_CACHE" section all properties of the SQLiteAppl / ExpireCache and their last modification date are shown:: properties of ENGINES_CACHE =========================== [last modified: 2025-04-22 11:32:27] DB_SCHEMA : 1 [last modified: 2025-04-22 11:32:27] LAST_MAINTENANCE : [last modified: 2025-04-22 11:32:27] crypt_hash : ca612e3566fdfd7cf7efe2b1c9349f461158d07cb78a3750e5c5be686aa8ebdc [last modified: 2025-04-22 11:32:30] CACHE-TABLE--demo_offline: demo_offline [last modified: 2025-04-22 11:32:30] CACHE-TABLE--startpage: startpage [last modified: 2025-04-22 11:32:31] CACHE-TABLE--duckduckgo: duckduckgo [last modified: 2025-04-22 11:33:08] CACHE-TABLE--radio_browser: radio_browser [last modified: 2025-04-22 11:40:06] CACHE-TABLE--soundcloud: soundcloud [last modified: 2025-04-22 11:40:06] CACHE-TABLE--wolframalpha: wolframalpha These properties provide information about the state of the ExpireCache and control the behavior. For example, the maintenance intervals are controlled by the last modification date of the LAST_MAINTENANCE property and the hash value of the password can be used to detect whether the password has been changed (in this case the DB entries can no longer be decrypted and the entire cache must be discarded). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
.. SPDX-License-Identifier: AGPL-3.0-or-later ---- .. figure:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng.svg :target: https://docs.searxng.org/ :alt: SearXNG :width: 100% :align: center ---- Privacy-respecting, hackable `metasearch engine`_ Searx.space_ lists ready-to-use running instances. A user_, admin_ and developer_ handbook is available on the homepage_. |SearXNG install| |SearXNG homepage| |SearXNG wiki| |AGPL License| |Issues| |commits| |weblate| |SearXNG logo| ---- .. _searx.space: https://searx.space .. _user: https://docs.searxng.org/user .. _admin: https://docs.searxng.org/admin .. _developer: https://docs.searxng.org/dev .. _homepage: https://docs.searxng.org/ .. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine .. |SearXNG logo| image:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng-wordmark.svg :target: https://docs.searxng.org/ :width: 5% .. |SearXNG install| image:: https://img.shields.io/badge/-install-blue :target: https://docs.searxng.org/admin/installation.html .. |SearXNG homepage| image:: https://img.shields.io/badge/-homepage-blue :target: https://docs.searxng.org/ .. |SearXNG wiki| image:: https://img.shields.io/badge/-wiki-blue :target: https://github.com/searxng/searxng/wiki .. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg :target: https://github.com/searxng/searxng/blob/master/LICENSE .. |Issues| image:: https://img.shields.io/github/issues/searxng/searxng?color=yellow&label=issues :target: https://github.com/searxng/searxng/issues .. |PR| image:: https://img.shields.io/github/issues-pr-raw/searxng/searxng?color=yellow&label=PR :target: https://github.com/searxng/searxng/pulls .. |commits| image:: https://img.shields.io/github/commit-activity/y/searxng/searxng?color=yellow&label=commits :target: https://github.com/searxng/searxng/commits/master .. |weblate| image:: https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg :target: https://translate.codeberg.org/projects/searxng/ Contact ======= Ask questions or chat with the SearXNG community (this not a chatbot) on IRC `#searxng on libera.chat <https://web.libera.chat/?channel=#searxng>`_ which is bridged to Matrix. Matrix `#searxng:matrix.org <https://matrix.to/#/#searxng:matrix.org>`_ Setup ===== - A well maintained `Docker image`_, also built for ARM64 and ARM/v7 architectures. - Alternatively there are *up to date* `installation scripts`_. - For individual setup consult our detailed `Step by step`_ instructions. - To fine-tune your instance, take a look at the `Administrator documentation`_. .. _Administrator documentation: https://docs.searxng.org/admin/index.html .. _Step by step: https://docs.searxng.org/admin/installation-searxng.html .. _installation scripts: https://docs.searxng.org/admin/installation-scripts.html .. _Docker image: https://github.com/searxng/searxng-docker Translations ============ .. _Weblate: https://translate.codeberg.org/projects/searxng/searxng/ Help translate SearXNG at `Weblate`_ .. figure:: https://translate.codeberg.org/widgets/searxng/-/multi-auto.svg :target: https://translate.codeberg.org/projects/searxng/ Contributing ============ .. _development quickstart: https://docs.searxng.org/dev/quickstart.html .. _developer documentation: https://docs.searxng.org/dev/index.html Are you a developer? Have a look at our `development quickstart`_ guide, it's very easy to contribute. Additionally we have a `developer documentation`_. Codespaces ========== You can contribute from your browser using `GitHub Codespaces`_: - Fork the repository - Click on the ``<> Code`` green button - Click on the ``Codespaces`` tab instead of ``Local`` - Click on ``Create codespace on master`` - VSCode is going to start in the browser - Wait for ``git pull && make install`` to appear and then disappear - You have `120 hours per month`_ (see also your `list of existing Codespaces`_) - You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B`` .. _GitHub Codespaces: https://docs.github.com/en/codespaces/overview .. _120 hours per month: https://github.com/settings/billing .. _list of existing Codespaces: https://github.com/codespaces
Languages
Python
77.5%
Shell
8.3%
HTML
5.8%
Less
4.3%
JavaScript
2.7%
Other
1.2%