CRM_Utils_System::flushCache - More consistent behavior. Prepare for interface-php...
authorTim Otten <totten@civicrm.org>
Tue, 21 Jun 2022 10:33:42 +0000 (03:33 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 28 Jun 2022 00:18:21 +0000 (17:18 -0700)
commitc6cf61f26229161961c9f6c849f54b1af764dec1
tree50817cabcce0851b051c89188627c333c0241a67
parenta80402bcacd5eee7f23988ed03094566cd81cf27
CRM_Utils_System::flushCache - More consistent behavior. Prepare for interface-php test.

* The interface-php test registers an instance of WorkflowMessageInterface.
* The list of WorkflowMessageInterface's is stored in the 'long' cache.
* When you enable/disable an extension, it should clear WorkflowMessage list (and other things).
* Before this patch, interface-php's `LifecycleTest` is inconsistent: it passes with
  `testLifecycleWithSubprocesses()` and fails with `testLifecycleWithLocalFunctions()`.
* After this patch, interface-php's `LifecycleTest` is consistent: it passes with both
  `testLifecycleWithSubprocesses()` and  `testLifecycleWithLocalFunctions()`.
* The problem - while executing `testLifecycleWithLocalFunctions()`, it evidentally uses
  `Arraycache` as the backend -- and thus skips the flushes. However, I cannot fathom why
  one would want to clear-caches for SQL+memcache+redis but keep them for Arraycache.
CRM/Utils/System.php