diff --git a/kernel/classes/ezsiteaccess.php b/kernel/classes/ezsiteaccess.php index 1b02f2b4e4..136145a9dd 100644 --- a/kernel/classes/ezsiteaccess.php +++ b/kernel/classes/ezsiteaccess.php @@ -542,6 +542,14 @@ 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 7503a76c3f..f7a49054e9 100644 --- a/lib/ezutils/classes/ezexpiryhandler.php +++ b/lib/ezutils/classes/ezexpiryhandler.php @@ -188,6 +188,15 @@ public static function registerShutdownFunction(){ eZDebug::writeStrict( __METHOD__ . " is deprecated. See EZP-22749.", __METHOD__ . " is deprecated" ); } + static function refresh(): void + { + if ( isset( $GLOBALS['eZExpiryHandlerInstance'] ) ) + { + unset( $GLOBALS['eZExpiryHandlerInstance'] ); + } + } + + /** * Holds the expiry timestamps array * @var array diff --git a/settings/site.ini b/settings/site.ini index e0a63c0e56..766904ae31 100644 --- a/settings/site.ini +++ b/settings/site.ini @@ -1575,3 +1575,6 @@ Password= [LinkCheck] # Used by the linkcheck cronjob, ConnectTimeout specifies the limit (in seconds) to wait for a valid connection. ConnectTimeout=3 + +[ExpiryHandler] +ExpiryFilePerSiteAccess=disabled \ No newline at end of file