Skip to content

Commit 641afa6

Browse files
authored
Merge pull request #733 from soyuka/doc-metadata-cache-parameter
Document metadata cache parameter
2 parents 1113a82 + 3fad1a3 commit 641afa6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

core/performance.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ API Platform internally uses a [PSR-6](http://www.php-fig.org/psr/psr-6/) cache.
140140
Best performance is achieved using [APCu](https://github.com/krakjoe/apcu). Be sure to have the APCu extension installed
141141
on your production server, API Platform will automatically use it.
142142

143+
This parameter can be changed by changing the value of `api_platform.metadata_cache`:
144+
145+
```yaml
146+
# api/config/config.yaml
147+
148+
parameters:
149+
# Enable the metadata cache to speedup the builds
150+
api_platform.metadata_cache: true
151+
```
152+
143153
## Using PPM (PHP-PM)
144154

145155
Response time of the API can be improved up to 15x by using [PHP Process Manager](https://github.com/php-pm/php-pm). If
@@ -259,7 +269,7 @@ class User
259269
* @ORM\JoinTable(name="users_groups")
260270
*/
261271
public $groups;
262-
272+
263273
// ...
264274
}
265275
```
@@ -295,7 +305,7 @@ class Group
295305
* @ManyToMany(targetEntity="User", mappedBy="groups")
296306
*/
297307
public $users;
298-
308+
299309
// ...
300310
}
301311
```

0 commit comments

Comments
 (0)