backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

[UX] Provide info and (possible) option to clear caches when enabling maintenance mode #6648

Open yorkshire-pudding opened 2 months ago

yorkshire-pudding commented 2 months ago

Description of the need

When maintenance mode is enabled, cached pages continue to be visible although non-cached page show the site in maintenance mode. This may well be the intended behaviour and in many cases, having some pages cached while a quick update is done could reduce the the number of 503 (Service Unavailable). However, it is not clear to site admins that this will happen. I was testing a module I'm porting and this behaviour intrigued me so I investigated the effects without the module and found the same.

Some use cases of maintenance mode might actually want the site to show as unavailable the whole time, and some may prefer the clarity of everything being offline rather than some pages being visible and others showing as unavailable.

I then found this issue (still unresolved) in the Drupal queue relating to modern Drupal: https://www.drupal.org/project/drupal/issues/2804387

I quite like the suggestion by "isa.bel" image

but there is no consensus there.

Proposed solution

At least there should be some information to say that:

Placing your site into maintenance mode will stop un-cached pages from being served, but some cached pages will still be available. If you want all your pages to be unavailable you should clear the "Page and Else" cache.

Possibly the text should change depending on whether cache is enabled or not?

I think it is user friendly to allow the site admin to clear the page cache as part of enabling maintenance mode, so it would be good to include this IMHO, but I fully accept, that like the Drupal issue, others may not agree.

Alternatives that have been considered

Describe alternatives you've considered. Have you seen this work in a better way in another CMS? Just looked at Drupal issue above.

Draft of feature description for Press Release (1 paragraph at most)

Backdrop now includes the option for site admins to clear the cache as part of enabling or disabling maintenance mode.

klonos commented 2 months ago

I agree with the suggestion to be clearing caches when enabling/disabling maintenance mode šŸ‘šŸ¼ ...although I'd suggest to implement this as two submit buttons instead of adding a checkbox. So basically follow the same pattern as "Save" and "Save and configure" buttons, and keep the "Save configuration" button, but also add another "Save configuration and clear caches" button next to it.

yorkshire-pudding commented 2 months ago

Good idea @klonos