diff --git a/AUTHORS.md b/AUTHORS.md index 8398e0cb5..297e47fdb 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -115,6 +115,7 @@ date of first contribution): * [Ludovico de Nittis](https://github.com/RyuzakiKK) * [Dominik Paľo](https://github.com/DominikPalo) * [Kelly Anderson](https://github.com/cbxbiker61) + * [Mike Ryan](https://github.com/justfalter) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index d625844ec..0bc9dd113 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -587,11 +587,10 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin): There are two methods used in order to allow for caching of the actual response sent to the client. Whatever a plugin implementation returns from the call to its :meth:`~octoprint.plugin.UiPlugin.on_ui_render` method - will be cached server side. The cache will be emptied in case of explicit - no-cache headers sent by the client, or if the ``_refresh`` query parameter - on the request exists and is set to ``true``. To prevent caching of the - response altogether, a plugin may set no-cache headers on the returned - response as well. + will be cached server side. The cache will be emptied if the ``_refresh`` + query parameter on the request exists and is set to ``true``. To prevent + caching of the response altogether, a plugin may set no-cache headers on + the returned response as well. ``UiPlugin`` is a :class:`~octoprint.plugin.core.SortablePlugin` with a sorting context for :meth:`~octoprint.plugin.UiPlugin.will_handle_ui`. The first plugin to return ``True`` diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 181869654..9b8bbe756 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -174,8 +174,8 @@ def index(): def wizard_active(templates): return templates is not None and bool(templates["wizard"]["order"]) - # we force a refresh if the client forces one or if we have wizards cached - force_refresh = util.flask.cache_check_headers() or "_refresh" in request.values or wizard_active(_templates.get(locale)) + # we force a refresh if '_refresh' is in the query or if we have wizards cached + force_refresh = "_refresh" in request.values or wizard_active(_templates.get(locale)) # if we need to refresh our template cache or it's not yet set, process it fetch_template_data(refresh=force_refresh)