Skip to content

Commit

Permalink
Cache client when it's fetched from first personalAccessClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Canguru committed Apr 1, 2024
1 parent 388fadb commit c06e81a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/MemoizedClientRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,11 @@ public function clearInternalCache(): void
{
$this->cache = [];
}

public function personalAccessClient(): Client
{
$client = parent::personalAccessClient();
$this->cache[$client->id] = $client;
return $client;
}
}

0 comments on commit c06e81a

Please sign in to comment.