Created
January 21, 2016 16:30
-
-
Save m4s0/3df7b77cf8d3b52d7b05 to your computer and use it in GitHub Desktop.
Symfony - Move cache and log dir to shared memory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getCacheDir() | |
{ | |
if (in_array($this->environment, array('dev'))) { | |
return '/dev/shm/site/cache/' . $this->environment; | |
} | |
return parent::getCacheDir(); | |
} | |
public function getLogDir() | |
{ | |
if (in_array($this->environment, array('dev'))) { | |
return '/dev/shm/site/logs'; | |
} | |
return parent::getLogDir(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment