|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<container xmlns="http://symfony.com/schema/dic/services"> |
| 3 | + |
| 4 | + <config xmlns="http://example.org/schema/dic/fos_http_cache"> |
| 5 | + <cache-control> |
| 6 | + <rule> |
| 7 | + <match |
| 8 | + path="/abc" |
| 9 | + host="fos" |
| 10 | + > |
| 11 | + <method>GET</method> |
| 12 | + <method>POST</method> |
| 13 | + <ip>1.2.3.4</ip> |
| 14 | + <ip>1.1.1.1</ip> |
| 15 | + <attribute name="_controller">fos.user_bundle.*</attribute> |
| 16 | + <additional-cacheable-status>100</additional-cacheable-status> |
| 17 | + <additional-cacheable-status>500</additional-cacheable-status> |
| 18 | + </match> |
| 19 | + <headers last-modified="-1 hour" reverse-proxy-ttl="42"> |
| 20 | + <cache-control |
| 21 | + max-age="1" |
| 22 | + s-maxage="2" |
| 23 | + public="true" |
| 24 | + must-revalidate="true" |
| 25 | + proxy-revalidate="false" |
| 26 | + no-transform="true" |
| 27 | + no-cache="false" |
| 28 | + stale-if-error="3" |
| 29 | + stale-while-revalidate="4" |
| 30 | + /> |
| 31 | + <vary>Cookie</vary> |
| 32 | + <vary>Authorization</vary> |
| 33 | + </headers> |
| 34 | + </rule> |
| 35 | + </cache-control> |
| 36 | + <proxy-client> |
| 37 | + <varnish base-url="/test"> |
| 38 | + <server>22.22.22.22</server> |
| 39 | + </varnish> |
| 40 | + </proxy-client> |
| 41 | + |
| 42 | + <cache-manager enabled="true"/> |
| 43 | + |
| 44 | + <tags> |
| 45 | + <rule> |
| 46 | + <match path="/def" host="friends"> |
| 47 | + <method>PUT</method> |
| 48 | + <method>DELETE</method> |
| 49 | + <ip>99.99.99.99</ip> |
| 50 | + <attribute name="_foo">bar</attribute> |
| 51 | + <additional-cacheable-status>501</additional-cacheable-status> |
| 52 | + <additional-cacheable-status>502</additional-cacheable-status> |
| 53 | + </match> |
| 54 | + <tag>a</tag> |
| 55 | + <tag>b</tag> |
| 56 | + <tag-expression>"a"</tag-expression> |
| 57 | + <tag-expression>"b"</tag-expression> |
| 58 | + </rule> |
| 59 | + </tags> |
| 60 | + |
| 61 | + <invalidation> |
| 62 | + <rule> |
| 63 | + <match path="/hij" host="symfony"> |
| 64 | + <method>PATCH</method> |
| 65 | + <ip>42.42.42.42</ip> |
| 66 | + <attribute name="_format">json</attribute> |
| 67 | + <additional-cacheable-status>404</additional-cacheable-status> |
| 68 | + <additional-cacheable-status>403</additional-cacheable-status> |
| 69 | + </match> |
| 70 | + <route name="invalidate_route1" ignore-extra-params="false"/> |
| 71 | + </rule> |
| 72 | + </invalidation> |
| 73 | + |
| 74 | + <user-context hash-cache-ttl="300" role-provider="true" user-hash-header="FOS-User-Context-Hash"> |
| 75 | + <match method="GET"/> |
| 76 | + <user-identifier-header>Cookie</user-identifier-header> |
| 77 | + <user-identifier-header>Authorization</user-identifier-header> |
| 78 | + </user-context> |
| 79 | + |
| 80 | + <flash-message name="flashtest" path="/x" host="y" secure="true" httpOnly="false"/> |
| 81 | + |
| 82 | + <debug header="FOS-Cache-Debug"/> |
| 83 | + |
| 84 | + </config> |
| 85 | +</container> |
0 commit comments