X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FHook.php;h=d7b1f737a0289ad0e30c837ffb33e44fe4acdae7;hb=56a77f5275ba8566a37d690ade0e929c88b828e2;hp=851dd60ed945277a2c86a9c8addd41c313aaf428;hpb=bd1f4ebbde207b0c6b84a11f3170c4f5b9a2ea12;p=friendica.git diff --git a/src/Core/Hook.php b/src/Core/Hook.php index 851dd60ed9..d7b1f737a0 100644 --- a/src/Core/Hook.php +++ b/src/Core/Hook.php @@ -247,6 +247,8 @@ class Hook /** * Deletes one or more hook records * + * We have to clear the cached routerDispatchData because addons can provide routes + * * @param array $condition * @param array $options * @return bool @@ -256,12 +258,18 @@ class Hook { $result = DBA::delete('hook', $condition, $options); + if ($result) { + DI::cache()->delete('routerDispatchData'); + } + return $result; } /** * Inserts a hook record * + * We have to clear the cached routerDispatchData because addons can provide routes + * * @param array $condition * @return bool * @throws \Exception @@ -270,6 +278,10 @@ class Hook { $result = DBA::insert('hook', $condition); + if ($result) { + DI::cache()->delete('routerDispatchData'); + } + return $result; } }