From e85351ba75b6381a3ad355fd69cf80c936c33f08 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 14 Oct 2012 17:42:04 +0200 Subject: [PATCH] Unified names for user group cache files Fixes #749 --- wcfsetup/install/files/lib/data/user/group/UserGroup.class.php | 2 +- .../files/lib/data/user/group/UserGroupEditor.class.php | 2 +- .../lib/data/user/group/option/UserGroupOptionAction.class.php | 3 ++- .../install/files/lib/system/session/SessionHandler.class.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php b/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php index 95a72a7231..a5b361d4c4 100644 --- a/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php +++ b/wcfsetup/install/files/lib/data/user/group/UserGroup.class.php @@ -198,7 +198,7 @@ class UserGroup extends DatabaseObject { if (self::$cache === null) { CacheHandler::getInstance()->addResource( 'usergroups', - WCF_DIR.'cache/cache.usergroups.php', + WCF_DIR.'cache/cache.userGroups.php', 'wcf\system\cache\builder\UserGroupCacheBuilder' ); self::$cache = CacheHandler::getInstance()->get('usergroups'); diff --git a/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php b/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php index 1bb59c455a..90fc4901ce 100644 --- a/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php +++ b/wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php @@ -200,7 +200,7 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj */ public static function resetCache() { // clear cache - CacheHandler::getInstance()->clear(WCF_DIR.'cache', 'cache.groups*.php'); + CacheHandler::getInstance()->clear(WCF_DIR.'cache/', 'cache.userGroups*.php'); // clear sessions SessionHandler::resetSessions(); diff --git a/wcfsetup/install/files/lib/data/user/group/option/UserGroupOptionAction.class.php b/wcfsetup/install/files/lib/data/user/group/option/UserGroupOptionAction.class.php index 2a91145d72..6c4a62841a 100644 --- a/wcfsetup/install/files/lib/data/user/group/option/UserGroupOptionAction.class.php +++ b/wcfsetup/install/files/lib/data/user/group/option/UserGroupOptionAction.class.php @@ -1,5 +1,6 @@ clear(WCF_DIR.'cache/', 'cache.groups-*.php'); + UserGroupEditor::resetCache(); } } diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index d0ffda71b4..82efbfb426 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -406,7 +406,7 @@ class SessionHandler extends SingletonFactory { $cacheName = 'groups-'.PACKAGE_ID.'-'.$groups; CacheHandler::getInstance()->addResource( $cacheName, - WCF_DIR.'cache/cache.groups-'.PACKAGE_ID.'-'.$groupsFileName.'.php', + WCF_DIR.'cache/cache.userGroups-'.PACKAGE_ID.'-'.$groupsFileName.'.php', 'wcf\system\cache\builder\UserGroupPermissionCacheBuilder' ); -- 2.20.1