diff --git a/kernel/classes/ezsiteaccess.php b/kernel/classes/ezsiteaccess.php index eb5b50150d5..9e0bf9563ca 100644 --- a/kernel/classes/ezsiteaccess.php +++ b/kernel/classes/ezsiteaccess.php @@ -553,6 +553,13 @@ static function change( array $access, eZINI $siteINI = null ) eZDebugSetting::writeDebug( 'kernel-siteaccess', "Updated settings to use siteaccess '$name'", __METHOD__ ); } + $ini = eZINI::instance(); + if ( $ini->hasVariable( 'ExpiryHandler', 'ExpiryFilePerSiteAccess' ) + && $ini->variable( 'ExpiryHandler', 'ExpiryFilePerSiteAccess' ) == 'enabled' ) + { + eZExpiryHandler::refresh(); + } + return $access; } diff --git a/lib/ezutils/classes/ezexpiryhandler.php b/lib/ezutils/classes/ezexpiryhandler.php index 2c4fb482116..f620102a7d4 100644 --- a/lib/ezutils/classes/ezexpiryhandler.php +++ b/lib/ezutils/classes/ezexpiryhandler.php @@ -160,6 +160,14 @@ static function instance() return $GLOBALS['eZExpiryHandlerInstance']; } + + static function refresh() + { + if ( isset( $GLOBALS['eZExpiryHandlerInstance'] ) ) + { + unset( $GLOBALS['eZExpiryHandlerInstance'] ); + } + } /** * Checks if a shared instance of eZExpiryHandler exists diff --git a/settings/site.ini b/settings/site.ini index def6d0edd24..af265fe626c 100644 --- a/settings/site.ini +++ b/settings/site.ini @@ -9,6 +9,8 @@ # in non-virtualhost modes (the .php file may already be present # and can be used for this purpose). +[ExpiryHandler] +ExpiryFilePerSiteAccess=disabled [Cache] # Array with cache items to extend ezcache