From 3cf07c5fae4d45c771baae2af0ce9beb6893dfba Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 7 Aug 2018 23:39:55 -0700 Subject: [PATCH] Afform.create, Afform.revert - Clear file-cache adding/deleting files --- ext/afform/api/v3/Afform/Create.php | 3 +++ ext/afform/api/v3/Afform/Revert.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ext/afform/api/v3/Afform/Create.php b/ext/afform/api/v3/Afform/Create.php index 599c763149..38257e3fe7 100644 --- a/ext/afform/api/v3/Afform/Create.php +++ b/ext/afform/api/v3/Afform/Create.php @@ -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. diff --git a/ext/afform/api/v3/Afform/Revert.php b/ext/afform/api/v3/Afform/Revert.php index 3dced7646c..3e7f5f8d24 100644 --- a/ext/afform/api/v3/Afform/Revert.php +++ b/ext/afform/api/v3/Afform/Revert.php @@ -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. -- 2.25.1