WebSockets: disable http caching if NDEBUG is set

This is useful while developing web surface javascript code
This commit is contained in:
Luciano Iam 2020-04-22 11:18:50 +02:00 committed by Robin Gareus
parent b0733a0d20
commit 8b65b0a961
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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));