From 8b65b0a9613a7a25e415c2a9d402c602735cc221 Mon Sep 17 00:00:00 2001 From: Luciano Iam Date: Wed, 22 Apr 2020 11:18:50 +0200 Subject: [PATCH] WebSockets: disable http caching if NDEBUG is set This is useful while developing web surface javascript code --- libs/surfaces/websockets/server.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 280efa5b89..7613d85e38 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -72,9 +72,11 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) _lws_mnt_root.origin = _resources.index_dir ().c_str (); _lws_mnt_root.origin_protocol = LWSMPRO_FILE; _lws_mnt_root.def = "index.html"; +#ifdef NDEBUG _lws_mnt_root.cache_max_age = 3600; _lws_mnt_root.cache_reusable = 1; _lws_mnt_root.cache_revalidate = 1; +#endif /* user defined surfaces in the user config directory */ memcpy (&_lws_mnt_user, &_lws_mnt_root, sizeof (lws_http_mount));