<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services">

    <config xmlns="http://example.org/schema/dic/fos_http_cache">
        <cacheable>
            <response>
                <additional-status>100</additional-status>
                <additional-status>500</additional-status>
            </response>
        </cacheable>
        <cache-control>
            <defaults>
                <overwrite>true</overwrite>
            </defaults>
            <rule>
                <match
                    path="/abc"
                    host="fos"
                    query_string="(^|&amp;)foo="
                    match_response="response.getStatusCode() == 404"
                >
                    <method>GET</method>
                    <method>POST</method>
                    <ip>1.2.3.4</ip>
                    <ip>1.1.1.1</ip>
                    <attribute name="_controller">fos.user_bundle.*</attribute>
                </match>
                <headers etag="true" last-modified="-1 hour" reverse-proxy-ttl="42">
                    <overwrite>false</overwrite>
                    <cache-control
                        max-age="1"
                        s-maxage="2"
                        public="true"
                        must-revalidate="true"
                        proxy-revalidate="false"
                        no-transform="true"
                        no-cache="false"
                        stale-if-error="3"
                        stale-while-revalidate="4"
                    />
                    <vary>Cookie</vary>
                    <vary>Authorization</vary>
                </headers>
            </rule>
        </cache-control>
        <proxy-client>
            <varnish tags-header="My-Cache-Tags" header-length="1234">
                <default-ban-header name="Foo">Bar</default-ban-header>
                <http base-url="/test" http-client="acme.guzzle.varnish">
                   <server>22.22.22.22</server>
                </http>
            </varnish>
        </proxy-client>

        <cache-manager enabled="true" custom-proxy-client="acme.proxy_client"/>

        <tags response-header="FOS-Tags" expression-language="acme.expression_language">
            <rule>
                <match path="/def" host="friends" query_string="(^|&amp;)bar=">
                    <method>PUT</method>
                    <method>DELETE</method>
                    <ip>99.99.99.99</ip>
                    <attribute name="_foo">bar</attribute>
                </match>
                <tag>a</tag>
                <tag>b</tag>
                <tag-expression>"a"</tag-expression>
                <tag-expression>"b"</tag-expression>
            </rule>
        </tags>

        <invalidation expression-language="acme.expression_language">
            <rule>
                <match path="/hij" host="symfony" query_string="(^|&amp;)baz=">
                    <method>PATCH</method>
                    <ip>42.42.42.42</ip>
                    <attribute name="_format">json</attribute>
                </match>
                <route name="invalidate_route1" ignore-extra-params="false"/>
            </rule>
        </invalidation>

        <user-context hash-cache-ttl="300" role-provider="true" session-name-prefix="PHPSESSID" user-hash-header="FOS-User-Context-Hash">
            <match method="GET"/>
            <user-identifier-header>Cookie</user-identifier-header>
            <user-identifier-header>Authorization</user-identifier-header>
        </user-context>

        <flash-message name="flashtest" path="/x" host="y" secure="true" />

        <debug header="FOS-Cache-Debug"/>

    </config>
</container>
