~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
Remove internal settings manager cache. (#620)
Daniel Pettiba328a6023c3
diff --git a/src/local_deep_research/database/models/benchmark.py b/src/local_deep_research/database/models/benchmark.pyindex 4f310ab858..365d32bfab 100644--- a/src/local_deep_research/database/models/benchmark.py+++ b/src/local_deep_research/database/models/benchmark.py@@ -20,7 +20,6 @@ from sqlalchemy import (# Removed duplicate import - declarative_base not needed herefrom sqlalchemy.orm import relationshipfrom sqlalchemy.sql import func-from sqlalchemy.ext.declarative import declarative_base# Use the same base as the main appfrom . import Basediff --git a/src/local_deep_research/settings/manager.py b/src/local_deep_research/settings/manager.pyindex 9472099d17..70b3368fe1 100644--- a/src/local_deep_research/settings/manager.py+++ b/src/local_deep_research/settings/manager.py@@ -74,9 +74,6 @@ class SettingsManager(ISettingsManager):# Initialize settings lock as None - will be checked lazilyself.__settings_locked = None- # Simple in-memory cache- self._cache = {}-# Auto-initialize settings if database is emptyif self.db_session:self._ensure_settings_initialized()@@ -242,11 +239,6 @@ class SettingsManager(ISettingsManager):Returns:Setting value or default if not found"""- # Check cache first- cache_key = f"{key}:{check_env}"- if cache_key in self._cache:- return self._cache[cache_key]-# If using database first approach and session available, check databasetry:settings = self.__query_settings(key)@@ -256,8 +248,6 @@ class SettingsManager(ISettingsManager):settings[0], default, check_env)# Cache the result- cache_key = f"{key}:{check_env}"- self._cache[cache_key] = resultreturn resultelif len(settings) > 1:# This is a higher-level key.@@ -267,9 +257,6 @@ class SettingsManager(ISettingsManager):settings_map[output_key] = self.__get_typed_setting_value(setting, default, check_env)- # Cache the result- cache_key = f"{key}:{check_env}"- self._cache[cache_key] = settings_mapreturn settings_mapexcept SQLAlchemyError as e:logger.exception(@@ -344,13 +331,8 @@ class SettingsManager(ISettingsManager):if commit:self.db_session.commit()- # Clear cache on successful write- self._cache.clear()# Emit WebSocket event for settings changeself._emit_settings_changed([key])- else:- # Clear cache even without commit to be safe- self._cache.clear()return Trueexcept SQLAlchemyError:@@ -360,7 +342,6 @@ class SettingsManager(ISettingsManager):def clear_cache(self):"""Clear the settings cache."""- self._cache.clear()logger.debug("Settings cache cleared")def get_all_settings(self, bypass_cache: bool = False) -> Dict[str, Any]:@@ -373,9 +354,6 @@ class SettingsManager(ISettingsManager):Returns:Dictionary of all settings"""- if bypass_cache:- self._cache.clear()-result = {}# Add database settings if available@@ -531,13 +509,8 @@ class SettingsManager(ISettingsManager):if commit:self.db_session.commit()- # Clear cache on successful write- self._cache.clear()# Emit WebSocket event for settings changeself._emit_settings_changed([setting_obj.key])- else:- # Clear cache even without commit to be safe- self._cache.clear()return db_setting@@ -575,13 +548,6 @@ class SettingsManager(ISettingsManager):if commit:self.db_session.commit()- # Clear cache on successful delete- if result > 0:- self._cache.clear()- else:- # Clear cache even without commit to be safe- if result > 0:- self._cache.clear()return result > 0except SQLAlchemyError:@@ -677,8 +643,6 @@ class SettingsManager(ISettingsManager):if commit or delete_extra:self.db_session.commit()logger.info(f"Successfully imported {len(settings_data)} settings")- # Clear cache after import- self._cache.clear()# Emit WebSocket event for all imported settingsself._emit_settings_changed(list(settings_data.keys()))diff --git a/tests/citation_bugs/README.md b/tests/citation_bugs/README.mdindex eddeb9e127..98e3bc37e3 100644--- a/tests/citation_bugs/README.md+++ b/tests/citation_bugs/README.md@@ -31,9 +31,9 @@ pdm run pytest tests/citation_bugs/test_multiple_citations_bug.py -v## NotesThe current implementation doesn't actually have IEEE/APA/MLA citation styles. The available modes are:- `NUMBER_HYPERLINKS`: [1] with hyperlinks-- `DOMAIN_HYPERLINKS`: [arxiv.org] with hyperlinks+- `DOMAIN_HYPERLINKS`: [arxiv.org] with hyperlinks- `DOMAIN_ID_HYPERLINKS`: Smart numbering - [arxiv.org] or [arxiv.org-1]- `DOMAIN_ID_ALWAYS_HYPERLINKS`: Always numbered - [arxiv.org-1]- `NO_HYPERLINKS`: [1] without hyperlinks-These control how citations appear in the text, not the bibliographic format of the references.\ No newline at end of file+These control how citations appear in the text, not the bibliographic format of the references.diff --git a/tests/citation_bugs/__init__.py b/tests/citation_bugs/__init__.pyindex cbc7bb3df3..165c84bc09 100644--- a/tests/citation_bugs/__init__.py+++ b/tests/citation_bugs/__init__.py@@ -1 +1 @@-"""Tests for citation formatting bugs."""\ No newline at end of file+"""Tests for citation formatting bugs."""