From 51bcd95a754eca6d5a3420615ac6c3c37c993702 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 22 Sep 2023 07:50:09 +0200 Subject: [fix] harmonize default settings for caching of /static files Caching files on the client side for more than a day can confuse the end user when updating static files[1]. Depending on the way of providing a SearXNG instance via HTTP, there are several ways to optimize the access to the /static files. However, since we don't know what optimization an admin has provided for his static files, we should have moderate settings in the defaults that run robustly in a wide variety of installations. In this sense, all caches on the client side should be cleared after one day at the latest. So far the files were cached for one year on client side; as soon as changes are made to the static files (with the option `static_use_hash: true`) the old static files are kept for one year on the CLient side / which can also be evaluated as unnecessary caching. [1] https://github.com/searxng/searxng/discussions/2821 Signed-off-by: Markus Heiser --- dockerfiles/uwsgi.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dockerfiles') diff --git a/dockerfiles/uwsgi.ini b/dockerfiles/uwsgi.ini index a293d62d7..2d3155976 100644 --- a/dockerfiles/uwsgi.ini +++ b/dockerfiles/uwsgi.ini @@ -39,8 +39,8 @@ buffer-size = 8192 add-header = Connection: close # uwsgi serves the static files -# expires set to one year since there are hashes static-map = /static=/usr/local/searxng/searx/static -static-expires = /* 31557600 +# expires set to one day +static-expires = /* 86400 static-gzip-all = True offload-threads = %k -- cgit v1.2.3