Skip to content

Commit

Permalink
fix certificate caching, fixes #1033 (#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
redcapital authored and bshaffer committed Dec 6, 2017
1 parent a11ca6c commit 3eea433
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Google/AccessToken/Verify.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private function getFederatedSignOnCerts()
{
$certs = null;
if ($cache = $this->getCache()) {
$cacheItem = $cache->getItem('federated_signon_certs_v3', 3600);
$cacheItem = $cache->getItem('federated_signon_certs_v3');
$certs = $cacheItem->get();
}

Expand All @@ -189,6 +189,7 @@ private function getFederatedSignOnCerts()
);

if ($cache) {
$cacheItem->expiresAt(new DateTime('+1 hour'));
$cacheItem->set($certs);
$cache->save($cacheItem);
}
Expand Down

0 comments on commit 3eea433

Please sign in to comment.