@@ 140-143 (lines=4) @@ | ||
137 | $response->setClientTtl($this->options['ttl']); |
|
138 | $response->setVary($this->options['user_identifier_headers']); |
|
139 | $response->setPublic(); |
|
140 | if (4 <= Kernel::MAJOR_VERSION && 1 <= Kernel::MINOR_VERSION) { |
|
141 | // header to avoid Symfony SessionListener overwriting the response to private |
|
142 | $response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 1); |
|
143 | } |
|
144 | } else { |
|
145 | $response->setClientTtl(0); |
|
146 | $response->headers->addCacheControlDirective('no-cache'); |
|
@@ 201-204 (lines=4) @@ | ||
198 | && !in_array($this->options['user_hash_header'], $vary) |
|
199 | ) { |
|
200 | $vary[] = $this->options['user_hash_header']; |
|
201 | if (4 <= Kernel::MAJOR_VERSION && 1 <= Kernel::MINOR_VERSION) { |
|
202 | // header to avoid Symfony SessionListener overwriting the response to private |
|
203 | $response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 1); |
|
204 | } |
|
205 | } |
|
206 | } elseif ($this->options['add_vary_on_hash']) { |
|
207 | /* |