mirror of
https://github.com/searxng/searxng.git
synced 2025-07-19 11:19:54 +02:00
[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>
This commit is contained in:
parent
7351c38e6c
commit
8ef5fbca4e
2 changed files with 39 additions and 24 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue