I enabled maintenance mode on a Drupal 7 site; however, when I checked the homepage as an anonymous user, I noticed that the original homepage was still being displayed rather than the maintenance page. It was only after clearing the site's caches that the maintenance page was displayed. Anonymous page caching is enabled on the site.
I am wondering if it is necessary to clear the site cache's for maintenance mode be be effective or is it sufficient to just enable maintenance mode in the admin UI? My main objective to be able to safely run database updates, which should be run whilst the site is in maintenance mode. The actual display of the maintenance page is not really important.