Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/guide/http_cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -812,23 +812,23 @@ $response->headers->set('X-Location-Id', '123,212,42');

### Response tagging in templates

1\. `ez_http_tag_location()`
1\. `ez_http_cache_tag_location()`

For full content tagging when inline rendering, use the following:

``` html+twig
{{ ez_http_tag_location(location) }}
{{ ez_http_cache_tag_location(location) }}
```

2\. `ez_http_tag_relation_ids()` or `ez_http_tag_relation_location_ids()`
2\. `ez_http_cache_tag_relation_ids()` or `ez_http_cache_tag_relation_location_ids()`

When you want to reduce the amount of tags, or the inline content is rendered using ESI, a minimum set of tags can be set:

``` html+twig
{{ ez_http_tag_relation_ids(content.id) }}
{{ ez_http_cache_tag_relation_ids(content.id) }}

{# Or using array for several values #}
{{ ez_http_tag_relation_ids([field1.value.destinationContentId, field2.value.destinationContentId]) }}
{{ ez_http_cache_tag_relation_ids([field1.value.destinationContentId, field2.value.destinationContentId]) }}
```

3\. `{{ fos_httpcache_tag(['r33', 'r44']) }}`
Expand Down