Skip to content

Commit

Permalink
Check ignore_cache cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
HansSchouten committed Sep 28, 2022
1 parent a2d0c37 commit a165b55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PHPageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,11 @@ public function handlePublicRequest()

// try to find page in cache
$cache = phpb_instance('cache');
if (phpb_config('cache.enabled') && ! isset($_GET['ignore_cache']) && ! isset($_GET['refresh_cache'])) {
if (phpb_config('cache.enabled') &&
! isset($_GET['ignore_cache']) &&
! isset($_GET['refresh_cache']) &&
! isset($_COOKIE['ignore_cache'])
) {
$cachedContent = $cache->getForUrl(phpb_current_relative_url());
if ($cachedContent) {
echo $cachedContent;
Expand Down

0 comments on commit a165b55

Please sign in to comment.