php - Override cache directory in config.yml

42

Am I able to override the cache directory from config.yml or parameters.yml? Or set a config var and use this in AppKernel.php?

I've read, http://symfony.com/doc/current/cookbook/configuration/override_dir_structure.html#override-cache-dir

However having the config for an app in one place is a better idea, config.yml. In the example AppKernel needs to be modified to change the dir.

I could override something like this,

public function getCacheDir()
{
    return $this->config->cacheDir;
}

People are also looking for solutions to the problem: php - How to autocomplete bootstrap tokenfield with ajax?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.