Afform.create, Afform.revert - Clear file-cache adding/deleting files
authorTim Otten <totten@civicrm.org>
Wed, 8 Aug 2018 06:39:55 +0000 (23:39 -0700)
committerCiviCRM <info@civicrm.org>
Wed, 16 Sep 2020 02:13:16 +0000 (19:13 -0700)
ext/afform/api/v3/Afform/Create.php
ext/afform/api/v3/Afform/Revert.php

index 599c763149133f9b2e033ec43ca9d063772cbffe..38257e3fe732bdee3ef89367a9b2b9a4723535db 100644 (file)
@@ -62,6 +62,9 @@ function civicrm_api3_afform_create($params) {
     // FIXME check for writability then success. Report errors.
   }
 
+  // We may have changed list of files covered by the cache.
+  $scanner->clear();
+
   // FIXME if `server_route` changes, then flush the menu cache.
   // FIXME if asset-caching is enabled, then flush the asset cache.
 
index 3dced7646c82c4d6f94244f4b7f4f1f307535ea7..3e7f5f8d242fa19b4d476f52cfa733f21e7c33a5 100644 (file)
@@ -42,6 +42,9 @@ function civicrm_api3_afform_revert($params) {
     }
   }
 
+  // We may have changed list of files covered by the cache.
+  $scanner->clear();
+
   // FIXME if `server_route` changes, then flush the menu cache.
   // FIXME if asset-caching is enabled, then flush the asset cache.