Skip to content

Commit 72cd000

Browse files
committed
Revert fingerprinting/in-memory cache
1 parent 18ee2ed commit 72cd000

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

src/Illuminate/View/View.php

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ class View implements ArrayAccess, Htmlable, Stringable, ViewContract
5858
*/
5959
protected $path;
6060

61-
62-
/**
63-
* Cache of $view/$data sets.
64-
*
65-
* @var array
66-
*/
67-
static array $cache = [];
68-
6961
/**
7062
* Create a new view instance.
7163
*
@@ -213,36 +205,7 @@ protected function renderContents()
213205
*/
214206
protected function getContents()
215207
{
216-
$hash = hash('xxh3', join(',', $this->fingerprint($data = $this->gatherData())));
217-
218-
if ($cache = static::$cache[($path = $this->path).$hash] ?? null) {
219-
return $cache;
220-
}
221-
222-
static::$cache[$path.$hash] = $this->engine->get($path, $data);
223-
224-
return static::$cache[$path.$hash];
225-
}
226-
227-
/**
228-
* Fingerprint the data so that we can find identical renders.
229-
*/
230-
private function fingerprint(array $data): array
231-
{
232-
return array_map(
233-
function($item) {
234-
if (is_array($item)) {
235-
return serialize($this->fingerprint($item));
236-
}
237-
238-
if (is_object($item)) {
239-
return spl_object_hash($item);
240-
}
241-
242-
return serialize($item);
243-
},
244-
$data,
245-
);
208+
return $this->engine->get($this->path, $this->gatherData());
246209
}
247210

248211
/**

0 commit comments

Comments
 (0)