Properly resetting cache after application domain/path changing
authorAlexander Ebert <ebert@woltlab.com>
Mon, 28 Oct 2013 14:35:02 +0000 (15:35 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 28 Oct 2013 14:35:02 +0000 (15:35 +0100)
wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php
wcfsetup/install/files/lib/data/application/ApplicationAction.class.php

index 5a0d7d4d653ec9011f4482cbba6e48c62bc154ee..f0f0f8714e107bda2e6ec2e0ccd9aa11e810984e 100644 (file)
@@ -8,7 +8,6 @@ use wcf\system\application\ApplicationHandler;
 use wcf\form\AbstractForm;
 use wcf\system\exception\IllegalLinkException;
 use wcf\system\exception\UserInputException;
-use wcf\system\language\LanguageFactory;
 use wcf\system\Regex;
 use wcf\system\WCF;
 use wcf\util\FileUtil;
@@ -203,9 +202,6 @@ class ApplicationEditForm extends AbstractForm {
                // re-calculate cookie settings
                ApplicationHandler::rebuild();
                
-               // rebuild templates
-               LanguageFactory::getInstance()->deleteLanguageCache();
-               
                // show success.
                WCF::getTPL()->assign(array(
                        'success' => true
index 613f8248c8afb0f30f128f60f093dc2bdf2fcf2e..a6f6ab0ad62bc4fcdb9b9c4942f73bf717af196b 100644 (file)
@@ -1,8 +1,10 @@
 <?php
 namespace wcf\data\application;
 use wcf\data\AbstractDatabaseObjectAction;
+use wcf\system\cache\builder\ApplicationCacheBuilder;
 use wcf\system\exception\PermissionDeniedException;
 use wcf\system\exception\UserInputException;
+use wcf\system\language\LanguageFactory;
 use wcf\system\WCF;
 use wcf\util\FileUtil;
 use wcf\util\StringUtil;
@@ -98,6 +100,12 @@ class ApplicationAction extends AbstractDatabaseObjectAction {
                        }
                }
                WCF::getDB()->commitTransaction();
+               
+               // rebuild templates
+               LanguageFactory::getInstance()->deleteLanguageCache();
+               
+               // reset application cache
+               ApplicationCacheBuilder::getInstance()->reset();
        }
        
        /**