In the past, if one clears the `civicrm_cache` table (i.e. by calling
`CRM_Core_Config::clearDBCache()` ==> `TRUNCATE TABLE civicrm_cache`), then it
has the effect of destroying any active sessions/forms.
Now, in allowing sessions to be stored elsewhere, we lose that side-effect.
If we want strictly equivalent behavior (from a business-logic perspective),
then we'd want the patch to go a bit further -- calling
Civi::cache('session')->clear() at the same time that it does
`clearDBCache()`.
This revision adds `clear()` calls to various spots discussed here:
* https://docs.google.com/spreadsheets/d/1FxuIvr2noelBvhu5eja9_ps3YUWnkmGhqijBO3gH8Po/edit?usp=sharing
* https://github.com/civicrm/civicrm-core/pull/12362#issuecomment-
400897782
}
CRM_Core_Config::clearDBCache();
+ Civi::cache('session')->clear(); // This doesn't make a lot of sense to me, but it maintains pre-existing behavior.
CRM_Utils_System::flushCache();
CRM_Core_Resources::singleton()->resetCacheCode();
// clear all caches
CRM_Core_Config::clearDBCache();
+ Civi::cache('session')->clear();
CRM_Utils_System::flushCache();
parent::rebuildMenu();
// clear all caches
CRM_Core_Config::clearDBCache();
+ Civi::cache('session')->clear();
$moveStatus .= ts('Database cache tables cleared.') . '<br />';
$resetSessionTable = CRM_Utils_Request::retrieve('resetSessionTable',
// clear all caches
self::clearDBCache();
+ Civi::cache('session')->clear();
CRM_Utils_System::flushCache();
if ($sessionReset) {