aboutsummaryrefslogtreecommitdiff
path: root/middlewares
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2024-09-03 07:02:37 +0200
committerGravatar GitHub <noreply@github.com> 2024-09-03 07:02:37 +0200
commit293d04f296c33f7c524b84b7a0ae0d2625ca2729 (patch)
treedfb781be04fe4c4354f447f97bdd9d34976ed724 /middlewares
parent3dc8b65a0bb0296bdf0609c83841339014b1a663 (diff)
downloadrss-bridge-293d04f296c33f7c524b84b7a0ae0d2625ca2729.tar.gz
rss-bridge-293d04f296c33f7c524b84b7a0ae0d2625ca2729.tar.zst
rss-bridge-293d04f296c33f7c524b84b7a0ae0d2625ca2729.zip
fix(spotify): detect rate limiting (#4253)
Diffstat (limited to 'middlewares')
-rw-r--r--middlewares/CacheMiddleware.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/middlewares/CacheMiddleware.php b/middlewares/CacheMiddleware.php
index ae0d0d33..bffde4af 100644
--- a/middlewares/CacheMiddleware.php
+++ b/middlewares/CacheMiddleware.php
@@ -44,8 +44,8 @@ class CacheMiddleware implements Middleware
$response = $next($request);
if (in_array($response->getCode(), [403, 429, 500, 503])) {
- // Cache these responses for about ~20 mins on average
- $this->cache->set($cacheKey, $response, 60 * 15 + rand(1, 60 * 10));
+ // Cache these responses for about ~10 mins on average
+ $this->cache->set($cacheKey, $response, 60 * 5 + rand(1, 60 * 10));
}
// For 1% of requests, prune cache