~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
refactor: Use JSON column type for SearchCache results
LearningCircuitd3ec2b98eee2
diff --git a/src/local_deep_research/database/models/cache.py b/src/local_deep_research/database/models/cache.pyindex 1b72dedcea..0c2f466a83 100644--- a/src/local_deep_research/database/models/cache.py+++ b/src/local_deep_research/database/models/cache.py@@ -73,7 +73,9 @@ class SearchCache(Base):query_hash = Column(String, primary_key=True)query_text = Column(Text, nullable=False)- results = Column(Text, nullable=False) # JSON string+ results = Column(+ JSON, nullable=False+ ) # JSON column for automatic serializationcreated_at = Column(Integer, nullable=False) # Unix timestampexpires_at = Column(Integer, nullable=False) # Unix timestampaccess_count = Column(Integer, default=1)diff --git a/src/local_deep_research/utilities/search_cache.py b/src/local_deep_research/utilities/search_cache.pyindex 3673b4ca27..f1c5f16d73 100644--- a/src/local_deep_research/utilities/search_cache.py+++ b/src/local_deep_research/utilities/search_cache.py@@ -5,7 +5,6 @@ Includes TTL, LRU eviction, and query normalization."""import hashlib-import jsonimport timefrom functools import lru_cachefrom pathlib import Path@@ -164,7 +163,7 @@ class SearchCache:)if cache_entry:- results = json.loads(cache_entry.results)+ results = cache_entry.results# Update access statisticscache_entry.access_count += 1@@ -219,8 +218,6 @@ class SearchCache:expires_at = current_time + (ttl or self.default_ttl)try:- results_json = json.dumps(results)-# Store in databasesession = self.Session()try:@@ -234,7 +231,7 @@ class SearchCache:if existing:# Update existing entryexisting.query_text = self._normalize_query(query)- existing.results = results_json+ existing.results = resultsexisting.created_at = current_timeexisting.expires_at = expires_atexisting.access_count = 1@@ -244,7 +241,7 @@ class SearchCache:cache_entry = SearchCacheModel(query_hash=query_hash,query_text=self._normalize_query(query),- results=results_json,+ results=results,created_at=current_time,expires_at=expires_at,access_count=1,