adjust caching

This commit is contained in:
Cyberes 2023-08-23 23:14:18 -06:00
parent f3fe514c11
commit 48f4e0c7dd
1 changed files with 1 additions and 2 deletions

View File

@ -12,7 +12,6 @@ from llm_server.config import ConfigLoader, config_default_vars, config_required
from llm_server.database import get_number_of_rows, init_db from llm_server.database import get_number_of_rows, init_db
from llm_server.helpers import resolve_path from llm_server.helpers import resolve_path
from llm_server.routes.cache import cache, redis from llm_server.routes.cache import cache, redis
from llm_server.routes.helpers.http import cache_control
from llm_server.routes.queue import start_workers from llm_server.routes.queue import start_workers
from llm_server.routes.stats import SemaphoreCheckerThread, process_avg_gen_time from llm_server.routes.stats import SemaphoreCheckerThread, process_avg_gen_time
from llm_server.routes.v1 import bp from llm_server.routes.v1 import bp
@ -90,7 +89,7 @@ app.register_blueprint(bp, url_prefix='/api/v1/')
@app.route('/') @app.route('/')
@app.route('/api') @app.route('/api')
@cache.cached(timeout=5, query_string=True) @cache.cached(timeout=60, query_string=True)
def home(): def home():
if not opts.full_client_api: if not opts.full_client_api:
opts.full_client_api = f'https://{request.headers.get("Host")}/{opts.frontend_api_client.strip("/")}' opts.full_client_api = f'https://{request.headers.get("Host")}/{opts.frontend_api_client.strip("/")}'