Skip to content

Commit

Permalink
varnish is not provided by the default distribution anymore (#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu authored Oct 16, 2023
1 parent d8517ff commit a2c731f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ cache. This ensures that the content served will always be fresh, because the ca
most specific cases such as the invalidation of collections when a document is added or removed or for relationships and
inverse relations is built-in.

Integration with Varnish and Doctrine ORM is shipped with the core library, and [Varnish](https://varnish-cache.org/) is
included in the Docker setup provided with the [API Platform distribution](../distribution/index.md). If you use the distribution,
this feature works out of the box.
Integration with Varnish and Doctrine ORM is shipped with the core library.

If you don't use the distribution, add the following configuration to enable the cache invalidation system:
Add the following configuration to enable the cache invalidation system:

```yaml
api_platform:
Expand All @@ -40,7 +38,7 @@ api_platform:
vary: ['Content-Type', 'Authorization', 'Origin']
```
Support for reverse proxies other than Varnish can easily be added by implementing the `ApiPlatform\HttpCache\PurgerInterface`.
Support for reverse proxies other than Varnish can be added by implementing the `ApiPlatform\HttpCache\PurgerInterface`.
Two purgers are available, the http tags (`api_platform.http_cache.purger.varnish.ban`) or the surrogate key implementation
(`api_platform.http_cache.purger.varnish.xkey`). You can specify the implementation using the `purger` configuration node,
for example to use the xkey implementation:
Expand Down

0 comments on commit a2c731f

Please sign in to comment.