Skip to content

Commit 5c52d9a

Browse files
committed
minor #37232 [APP_CACHE_DIR] Ensure a split per environment when using that new variable (Plopix)
This PR was merged into the 5.2-dev branch. Discussion ---------- [APP_CACHE_DIR] Ensure a split per environment when using that new variable | Q | A | ------------- | --- | Branch | master | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT | Doc PR | symfony/symfony-docs#13819 All the explanation here: symfony/symfony-docs#13819 Commits ------- 06b793f59e Ensure a split per environment
2 parents c5bbd2b + 563ef92 commit 5c52d9a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Kernel/MicroKernelTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ trait MicroKernelTrait
6868
*/
6969
public function getCacheDir(): string
7070
{
71-
return $_SERVER['APP_CACHE_DIR'] ?? parent::getCacheDir();
71+
if (isset($_SERVER['APP_CACHE_DIR'])) {
72+
return $_SERVER['APP_CACHE_DIR'].'/'.$this->environment;
73+
}
74+
75+
return parent::getCacheDir();
7276
}
7377

7478
/**

0 commit comments

Comments
 (0)