From 3eea433cec0816860583440ec48b25a91bcf8cde Mon Sep 17 00:00:00 2001 From: Galymzhan Date: Wed, 6 Dec 2017 01:45:34 +0000 Subject: [PATCH] fix certificate caching, fixes #1033 (#1322) --- src/Google/AccessToken/Verify.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Google/AccessToken/Verify.php b/src/Google/AccessToken/Verify.php index 33f11797d..09d71b9dd 100644 --- a/src/Google/AccessToken/Verify.php +++ b/src/Google/AccessToken/Verify.php @@ -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(); } @@ -189,6 +189,7 @@ private function getFederatedSignOnCerts() ); if ($cache) { + $cacheItem->expiresAt(new DateTime('+1 hour')); $cacheItem->set($certs); $cache->save($cacheItem); }