diff --git a/src/Illuminate/View/View.php b/src/Illuminate/View/View.php index ef6655d47943..0751a8dff5ba 100755 --- a/src/Illuminate/View/View.php +++ b/src/Illuminate/View/View.php @@ -58,14 +58,6 @@ class View implements ArrayAccess, Htmlable, Stringable, ViewContract */ protected $path; - - /** - * Cache of $view/$data sets. - * - * @var array - */ - static array $cache = []; - /** * Create a new view instance. * @@ -213,26 +205,7 @@ protected function renderContents() */ protected function getContents() { - $hash = hash('xxh3', join(',', $this->fingerprint($data = $this->gatherData()))); - - if ($cache = static::$cache[($path = $this->path).$hash] ?? null) { - return $cache; - } - - static::$cache[$path.$hash] = $this->engine->get($path, $data); - - return static::$cache[$path.$hash]; - } - - /** - * Fingerprint the data so that we can find identical renders. - */ - private function fingerprint(array $data): array - { - return array_map( - fn($item) => is_object($item) ? spl_object_hash($item) : serialize($item), - $data, - ); + return $this->engine->get($this->path, $this->gatherData()); } /**