Skip to content

Instantly share code, notes, and snippets.

@m4s0
Created January 21, 2016 16:30
Show Gist options
  • Save m4s0/3df7b77cf8d3b52d7b05 to your computer and use it in GitHub Desktop.
Save m4s0/3df7b77cf8d3b52d7b05 to your computer and use it in GitHub Desktop.
Symfony - Move cache and log dir to shared memory
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