[TASK] Add a function for clearing the rootline caches
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Utility / RootlineUtility.php
index 626e438..f9dc672 100644 (file)
@@ -161,6 +161,18 @@ class RootlineUtility {
                $this->cacheIdentifier = $this->getCacheIdentifier();
        }
 
+       /**
+        * Purges all rootline caches.
+        *
+        * Note: This function is intended to be used in unit tests only.
+        *
+        * @return void
+        */
+       static public function purgeCaches() {
+               self::$localCache = array();
+               self::$pageRecordCache = array();
+       }
+
        /**
         * Constructs the cache Identifier
         *