-
- /**
- * Clears instance cache (and thereby also refreshes hooks)
- */
- function ajax_clear_cache()
- {
- if ($GLOBALS['egw']->acl->check('applications_acc',16,'admin'))
- {
- $GLOBALS['egw']->redirect_link('/index.php');
- }
- Api\Cache::flush(Api\Cache::INSTANCE, !empty($_GET['errored']) ? "all" : null);
-
- Api\Image::invalidate();
-
- if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // Egw object in setup is limited
- {
- $GLOBALS['egw']->invalidate_session_cache(); // in case with cache the egw_info array in the session
- }
- // allow apps to hook into "Admin >> Clear cache and register hooks"
- Api\Hooks::process('clear_cache', array(), true);
- }