File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,12 @@ public function withCacheLimit(int $cacheLimit): self
510
510
private function setupCache (): void
511
511
{
512
512
$ generator = $ this ->getGenerator ();
513
+
514
+ if (count ($ this ->cache ) % $ this ->cacheLimit === 0 ) {
515
+ $ this ->cache = [];
516
+ $ this ->keyCache = [];
517
+ }
518
+
513
519
if ($ this ->cache === [] && $ generator ->valid ()) {
514
520
$ this ->cache [$ generator ->key ()] = $ generator ->current ();
515
521
$ this ->keyCache [] = $ generator ->key ();
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ public function testFullWalk(string $connection): void
57
57
{
58
58
$ driver = Driver::create ($ connection );
59
59
60
- global $ session ;
61
-
62
60
$ session = $ driver ->createSession ();
63
61
64
62
$ session ->run ('MATCH (x) DETACH DELETE x ' );
You can’t perform that action at this time.
0 commit comments