summaryrefslogtreecommitdiff
path: root/searx/enginelib/__init__.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-05-01 11:31:29 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-05-03 08:39:12 +0200
commit8ef5fbca4e90668c8ae1f9f60f4d5d43816a593c (patch)
treefe22bf9435e471cbf0e668687ea79cc106d5380c /searx/enginelib/__init__.py
parent7351c38e6c7fb1386efafc1685a634f8a1bd1d84 (diff)
[fix] cache.ExpireCache: definition of a context name for the key
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>
Diffstat (limited to 'searx/enginelib/__init__.py')
-rw-r--r--searx/enginelib/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/enginelib/__init__.py b/searx/enginelib/__init__.py
index 7449578fa..0435b14e1 100644
--- a/searx/enginelib/__init__.py
+++ b/searx/enginelib/__init__.py
@@ -161,11 +161,11 @@ class EngineCache:
key=key,
value=value,
expire=expire or self.expire,
- table=self.table_name,
+ ctx=self.table_name,
)
def get(self, key: str, default=None) -> Any:
- return ENGINES_CACHE.get(key, default=default, table=self.table_name)
+ return ENGINES_CACHE.get(key, default=default, ctx=self.table_name)
def secret_hash(self, name: str | bytes) -> str:
return ENGINES_CACHE.secret_hash(name=name)