Skip to content

Commit 3eea433

Browse files
redcapitalbshaffer
authored andcommitted
fix certificate caching, fixes googleapis#1033 (googleapis#1322)
1 parent a11ca6c commit 3eea433

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Google/AccessToken/Verify.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private function getFederatedSignOnCerts()
178178
{
179179
$certs = null;
180180
if ($cache = $this->getCache()) {
181-
$cacheItem = $cache->getItem('federated_signon_certs_v3', 3600);
181+
$cacheItem = $cache->getItem('federated_signon_certs_v3');
182182
$certs = $cacheItem->get();
183183
}
184184

@@ -189,6 +189,7 @@ private function getFederatedSignOnCerts()
189189
);
190190

191191
if ($cache) {
192+
$cacheItem->expiresAt(new DateTime('+1 hour'));
192193
$cacheItem->set($certs);
193194
$cache->save($cacheItem);
194195
}

0 commit comments

Comments
 (0)