Fix: Fallback to Redis URL if no DB read cache Redis URL provided (#10315)

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Antoine Mérino 2025-07-02 19:59:24 +02:00 committed by GitHub
parent 3180ccf4cb
commit f940ed0b7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -921,7 +921,7 @@ def _parse_cachalot_settings():
ttl = __get_int("PAPERLESS_READ_CACHE_TTL", 3600) ttl = __get_int("PAPERLESS_READ_CACHE_TTL", 3600)
ttl = min(ttl, 31536000) if ttl > 0 else 3600 ttl = min(ttl, 31536000) if ttl > 0 else 3600
_, redis_url = _parse_redis_url( _, redis_url = _parse_redis_url(
os.getenv("PAPERLESS_READ_CACHE_REDIS_URL", None), os.getenv("PAPERLESS_READ_CACHE_REDIS_URL", _CHANNELS_REDIS_URL),
) )
result = { result = {
"CACHALOT_CACHE": "read-cache", "CACHALOT_CACHE": "read-cache",