Skip to content

Commit

Permalink
Update SetTtl.php
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Mar 5, 2018
1 parent 74ba603 commit ff09bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/SetTtl.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function handle($request, Closure $next, $seconds = 60)
{
$response = $next($request);

if ($response instanceof Response && $request instanceof Request && $request->isMethodSafe()) {
if ($response instanceof Response && $request instanceof Request && $request->isMethodCacheable()) {
$response->setTtl($seconds);
}

Expand Down

0 comments on commit ff09bf7

Please sign in to comment.