@@ -41,8 +41,8 @@ at your project root directory.
41
41
Override the Cache Directory
42
42
----------------------------
43
43
44
- You can change the default cache directory by overriding the `` getCacheDir() ``
45
- method in the ``Kernel `` class of your application::
44
+ Changing the cache directory can be achieved by overriding the
45
+ `` getCacheDir() `` method in the ``Kernel `` class of your application::
46
46
47
47
// src/Kernel.php
48
48
@@ -61,6 +61,9 @@ In this code, ``$this->environment`` is the current environment (i.e. ``dev``).
61
61
In this case you have changed the location of the cache directory to
62
62
``var/{environment}/cache/ ``.
63
63
64
+ This can also be achieved using a predefined environment variable named
65
+ ``APP_CACHE_DIR ``. Its value must be the full path of the cache folder.
66
+
64
67
.. caution ::
65
68
66
69
You should keep the cache directory different for each environment,
@@ -73,9 +76,11 @@ In this case you have changed the location of the cache directory to
73
76
Override the Log Directory
74
77
--------------------------
75
78
76
- Overriding the ``var/log/ `` directory is the same as overriding the ``var/cache/ ``
77
- directory. The only difference is that you need to override the ``getLogDir() ``
78
- method::
79
+ Overriding the ``var/log/ `` directory is almost the same as overriding the
80
+ ``var/cache/ `` directory.
81
+
82
+ You can do it overriding the ``getLogDir() `` method in the ``Kernel `` class of
83
+ your application::
79
84
80
85
// src/Kernel.php
81
86
@@ -92,6 +97,8 @@ method::
92
97
93
98
Here you have changed the location of the directory to ``var/{environment}/log/ ``.
94
99
100
+ And you can also do it using the predefined ``APP_LOG_DIR `` environment variable.
101
+
95
102
.. _override-templates-dir :
96
103
97
104
Override the Templates Directory
0 commit comments