Skip to content

Commit

Permalink
ttl config
Browse files Browse the repository at this point in the history
  • Loading branch information
emredipi committed Dec 24, 2023
1 parent 40ac1d5 commit f8bf3fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/cloudflare_cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

'identifier' => env('CLOUDFLARE_CACHE_IDENTIFIER'),

'cache_ttl' => env('CLOUDFLARE_CACHE_TTL'),
'default_cache_ttl' => env('CLOUDFLARE_DEFAULT_CACHE_TTL'),

'ignored_middlewares' => [
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
Expand Down
2 changes: 1 addition & 1 deletion src/CloudflarePagesMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function getCacheTTL(Request $request): int
return $request->attributes->get(CloudflareCache::TTL_ATTR);
}

return config('cloudflare_cache.cache_ttl') ?? 600;
return config('cloudflare_cache.default_cache_ttl') ?? 600;
}

public function shouldCacheResponse(Request $request, Response $response): bool
Expand Down

0 comments on commit f8bf3fe

Please sign in to comment.