Commit be648301 authored by Ben Longden's avatar Ben Longden

Takes advantage of fluent interface on Response object

parent fac3649a
...@@ -72,14 +72,12 @@ The provider also provides ESI support:: ...@@ -72,14 +72,12 @@ The provider also provides ESI support::
'Surrogate-Control' => 'content="ESI/1.0"', 'Surrogate-Control' => 'content="ESI/1.0"',
)); ));
$response->setTtl(20); return $response->setTtl(20);
return $response;
}); });
$app->get('/included', function() { $app->get('/included', function() {
$response = new Response('Foo'); $response = new Response('Foo');
$response->setTtl(5); return $response->setTtl(5);
return $response;
}); });
$app['http_cache']->run(); $app['http_cache']->run();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment