From 87f83ad14cc5c620c82edfb8d48e3e43fc96e266 Mon Sep 17 00:00:00 2001 From: Ryan Chandler Date: Sat, 22 May 2021 21:51:11 +0100 Subject: [PATCH] fix: dont evaluate contents twice --- src/BladeCacheDirectiveServiceProvider.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/BladeCacheDirectiveServiceProvider.php b/src/BladeCacheDirectiveServiceProvider.php index 0eedfb8..99f5466 100644 --- a/src/BladeCacheDirectiveServiceProvider.php +++ b/src/BladeCacheDirectiveServiceProvider.php @@ -30,28 +30,22 @@ public function packageBooted() if (\Illuminate\Support\Facades\Cache::has(\$__cache_directive_key)) { echo \Illuminate\Support\Facades\Cache::get(\$__cache_directive_key); - - ob_start(); } else { \$__cache_directive_buffering = true; ob_start(); - } ?>"; }); Blade::directive('endcache', function () { return ""; });