mirror of
https://github.com/TheSmallHanCat/sora2api.git
synced 2026-02-04 02:04:42 +08:00
fix: 修复缓存开关不生效
This commit is contained in:
@@ -141,7 +141,7 @@ class Config:
|
||||
@property
|
||||
def cache_enabled(self) -> bool:
|
||||
"""Get cache enabled status"""
|
||||
return self._config.get("cache", {}).get("enabled", True)
|
||||
return self._config.get("cache", {}).get("enabled", False)
|
||||
|
||||
def set_cache_enabled(self, enabled: bool):
|
||||
"""Set cache enabled status"""
|
||||
|
||||
@@ -87,9 +87,6 @@ class GenerationHandler:
|
||||
|
||||
def _get_base_url(self) -> str:
|
||||
"""Get base URL for cache files"""
|
||||
# Reload config to get latest values
|
||||
config.reload_config()
|
||||
|
||||
# Use configured cache base URL if available
|
||||
if config.cache_base_url:
|
||||
return config.cache_base_url.rstrip('/')
|
||||
|
||||
Reference in New Issue
Block a user