Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 7f5a781

Browse files
authored
recommend an absolute path
1 parent 8791d66 commit 7f5a781

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/book/features/router/fast-route.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ return [
312312
'router' => [
313313
'fastroute' => [
314314
'cache_enabled' => true, // bool
315-
'cache_file' => 'data/cache/fastroute.php.cache', //optional path relative to the working directory
315+
// optional (but recommended) cache file path
316+
'cache_file' => '/path/to/data/cache/fastroute.php.cache',
316317
],
317318
],
318319

@@ -325,10 +326,12 @@ The new entry options are quite self-explanatory:
325326
environment. Commenting or omitting this option is equivalent to having it set
326327
to `false`
327328
- `cache_file` (string) This is an optional parameter that represents the path of
328-
the dispatch data cache file relative to the zend-expressive working directory.
329-
The default is `data/cache/fastroute.php.cache`. `data/cache` is the
330-
default zend-expressive cache directory created by the skeleton application.
331-
An absolute file path is also supported.
329+
the dispatch data cache file. It can be provided as an absolute file path or as a
330+
path relative to the zend-expressive working directory.
331+
It defaults to `data/cache/fastroute.php.cache`, where `data/cache` is the
332+
commonly defined zend-expressive cache directory created by the skeleton application.
333+
An explicit absolute file path is recommended since the php `include` construct will
334+
skip searching in the `include_path`s and the current directory.
332335
If you choose a custom path make sure that the containing directory exists
333336
and is writable by the owner of the php process. As for other zend-expressive
334337
cached configuaration, you need to purge this file in order to enable any newly

0 commit comments

Comments
 (0)