| 1 | <?php |
||
| 14 | class ResponseCacheConfigurator |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Enables cache on a Response. |
||
| 18 | * |
||
| 19 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
| 20 | * |
||
| 21 | * @return self |
||
| 22 | */ |
||
| 23 | public function enableCache(Response $response) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Sets the shared-max-age property of a Response. |
||
| 32 | * |
||
| 33 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
| 34 | * @param int $ttl |
||
| 35 | * @param bool $replace If true, any existing value will be replaced |
||
| 36 | * |
||
| 37 | * @return self |
||
| 38 | */ |
||
| 39 | public function setSharedMaxAge(Response $response, $ttl, $replace = false) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Adds $tags to the response's cache tags header. |
||
| 50 | * |
||
| 51 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
| 52 | * @param string|array $tags Single tag, or array of tags |
||
| 53 | * |
||
| 54 | * @return self |
||
| 55 | */ |
||
| 56 | public function addTags(Response $response, $tags) |
||
| 62 | } |
||
| 63 |