Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 832f0b3a63
...
compare: 5e8feb1f25
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Sep 04, 2012
@timoschmidt timoschmidt * Configuration cache should take pid into account b29d662
Commits on Sep 06, 2012
@danielpoe Merge pull request #1 from timoschmidt/hotshit
* Configuration cache should take pid into account
5e8feb1
Showing with 8 additions and 5 deletions.
  1. +8 −5 Classes/Configuration/BackendConfigurationManager.php
View
13 Classes/Configuration/BackendConfigurationManager.php
@@ -34,7 +34,7 @@ class Tx_Extbase_Configuration_BackendConfigurationManager extends Tx_Extbase_Co
/**
* @var array
*/
- protected $typoScriptSetupCache = NULL;
+ protected $typoScriptSetupCache = array();
/**
* Returns TypoScript Setup array from current Environment.
@@ -42,7 +42,9 @@ class Tx_Extbase_Configuration_BackendConfigurationManager extends Tx_Extbase_Co
* @return array the raw TypoScript setup
*/
public function getTypoScriptSetup() {
- if ($this->typoScriptSetupCache === NULL) {
+ $pid = $this->getCurrentPageId();
+
+ if (! array_key_exists($pid, $this->typoScriptSetupCache) ) {
$template = t3lib_div::makeInstance('t3lib_TStemplate');
// do not log time-performance information
$template->tt_track = 0;
@@ -50,13 +52,14 @@ public function getTypoScriptSetup() {
// Get the root line
$sysPage = t3lib_div::makeInstance('t3lib_pageSelect');
// get the rootline for the current page
- $rootline = $sysPage->getRootLine($this->getCurrentPageId());
+ $rootline = $sysPage->getRootLine($pid);
// This generates the constants/config + hierarchy info for the template.
$template->runThroughTemplates($rootline, 0);
$template->generateConfig();
- $this->typoScriptSetupCache = $template->setup;
+ $this->typoScriptSetupCache[$pid] = $template->setup;
}
- return $this->typoScriptSetupCache;
+
+ return $this->typoScriptSetupCache[$pid];
}
/**

No commit comments for this range

Something went wrong with that request. Please try again.