From 5743bd6cecb4dbc0e5b1e84b5593d27c6d89c64d Mon Sep 17 00:00:00 2001 From: Oliver Mesieh Date: Wed, 26 Jun 2024 10:33:30 +0200 Subject: [PATCH] Flush Blink when Page has been generated It may happen that cached values of a request with Blink are used in further requests, leading to incorrect results. To prevent this from happening, Blink is flushed after the request. --- src/Generator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Generator.php b/src/Generator.php index 4263184..4278801 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -11,6 +11,7 @@ use League\Flysystem\Filesystem as Flysystem; use League\Flysystem\Local\LocalFilesystemAdapter; use Statamic\Contracts\Imaging\UrlBuilder; +use Statamic\Facades\Blink; use Statamic\Facades\Collection; use Statamic\Facades\Entry; use Statamic\Facades\Glide; @@ -301,6 +302,8 @@ protected function makeContentGenerationClosures($pages, $request) $warnings[] = $generated->consoleMessage(); } + + Blink::flush(); } return compact('count', 'warnings', 'errors');