1 update.module update_flush_caches()

Implements hook_flush_caches().

Called from update.php (among others) to flush the caches. Since we're running update.php, we are likely to install a new version of something, in which case, we want to check for available update data again. However, because we have our own caching system, we need to directly clear the database table ourselves at this point and return nothing, for example, on sites that use memcache where cache_clear_all() won't know how to purge this data.

However, we only want to do this from update.php, since otherwise, we'd lose all the available update data on every cron run. So, we specifically check if the site is in MAINTENANCE_MODE == 'update' (which indicates update.php is running, not update module... alas for overloaded names).

Related topics


core/modules/update/update.module, line 732
Handles update checking for Backdrop core and contributed projects.


function update_flush_caches() {
  if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') {
  return array();