Removing cache files upon group option update
authorAlexander Ebert <ebert@woltlab.com>
Fri, 7 Dec 2012 22:48:38 +0000 (23:48 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 7 Dec 2012 22:48:38 +0000 (23:48 +0100)
Fixes #967

wcfsetup/install/files/lib/data/user/group/option/UserGroupOptionEditor.class.php

index bb72e865a05165cbe2482360867aceb6142215bd..736994042d0581144940977a281de644e750d283 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 namespace wcf\data\user\group\option;
 use wcf\data\DatabaseObjectEditor;
+use wcf\data\IEditableCachedObject;
+use wcf\system\cache\CacheHandler;
 
 /**
  * Provides functions to edit usergroup options.
@@ -12,9 +14,16 @@ use wcf\data\DatabaseObjectEditor;
  * @subpackage data.user.group.option
  * @category   Community Framework
  */
-class UserGroupOptionEditor extends DatabaseObjectEditor {
+class UserGroupOptionEditor extends DatabaseObjectEditor implements IEditableCachedObject {
        /**
         * @see wcf\data\DatabaseObjectDecorator::$baseClass
         */
        protected static $baseClass = 'wcf\data\user\group\option\UserGroupOption';
+       
+       /**
+        * @see wcf\data\IEditableCachedObject::resetCache()
+        */
+       public static function resetCache() {
+               CacheHandler::getInstance()->clear(WCF_DIR.'cache/', 'cache.userGroup*.php');
+       }
 }