| 1 | <?php |
||
| 9 | class CacheableByVarnish |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Varnishable Service Object. |
||
| 13 | * |
||
| 14 | * @var \RichanFongdasen\Varnishable\VarnishableService |
||
| 15 | */ |
||
| 16 | protected $varnishable; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * CacheableByVarnish Middleware constructor. |
||
| 20 | */ |
||
| 21 | public function __construct() |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Handle an incoming request. |
||
| 28 | * |
||
| 29 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
| 30 | * @param \Closure $next |
||
| 31 | * @param int $cacheDuration |
||
| 32 | * |
||
| 33 | * @return \Symfony\Component\HttpFoundation\Response |
||
| 34 | */ |
||
| 35 | public function handle(Request $request, Closure $next, int $cacheDuration = 0) |
||
| 47 | } |
||
| 48 |