This commit is contained in:
Cyberes 2023-08-23 12:40:13 -06:00
parent 33190e3cfe
commit ba063f7f1b
2 changed files with 1 additions and 2 deletions

View File

@ -16,7 +16,7 @@ def cache_control(seconds):
@wraps(f)
def decorated_function(*args, **kwargs):
resp = make_response(f(*args, **kwargs))
if seconds >= 0:
if seconds > 0:
resp.headers['Cache-Control'] = f'public, max-age={seconds}'
else:
resp.headers['Cache-Control'] = f'no-store'

View File

@ -21,7 +21,6 @@ from ..cache import cache
@bp.route('/model', methods=['GET'])
@cache.cached(timeout=60, query_string=True)
@cache_control(60)
def get_model():
model = get_running_model()
if not model: