Skip to content

Commit ae99111

Browse files
committed
[Billing] Set cache lifespan for 15 minutes
1 parent e39c834 commit ae99111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Parthenon/Billing/Subscription/CachedSubscriptionProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getSubscription(string $id): Subscription
5353
$this->getLogger()->debug('Fetching subscription from original subscription provider');
5454
$this->subscription[$id] = $this->subscriptionProvider->getSubscription($id);
5555
$rawData = serialize($this->subscription[$id]);
56-
$this->redis->set($key, $rawData);
56+
$this->redis->set($key, $rawData, 900);
5757
} else {
5858
$this->getLogger()->debug('Got the subscription from cache');
5959
$this->subscription[$id] = unserialize($rawData);
@@ -77,7 +77,7 @@ public function getSubscriptionsForCustomer(CustomerInterface $customer): array
7777
$this->getLogger()->debug('Fetching subscriptions from original subscription provider');
7878
$this->subscriptions[$id] = $this->subscriptionProvider->getSubscriptionsForCustomer($customer);
7979
$rawData = serialize($this->subscriptions[$id]);
80-
$this->redis->set($key, $rawData);
80+
$this->redis->set($key, $rawData. 900);
8181
} else {
8282
$this->getLogger()->debug('Got the subscriptions from cache');
8383
$this->subscriptions[$id] = unserialize($rawData);

0 commit comments

Comments
 (0)