diff --git a/app/Http/Controllers/Api/Web/StatsController.php b/app/Http/Controllers/Api/Web/StatsController.php index 68d0091a..c0ccb7ff 100644 --- a/app/Http/Controllers/Api/Web/StatsController.php +++ b/app/Http/Controllers/Api/Web/StatsController.php @@ -109,7 +109,7 @@ class StatsController extends ApiControllerBase public function getTrackStats($id) { - $cachedOutput = Cache::remember('track_stats'.$id, 5, function () use ($id) { + $cachedOutput = Cache::remember('track_stats'.$id, 300, function () use ($id) { try { $track = Track::published()->findOrFail($id); } catch (ModelNotFoundException $e) { diff --git a/app/Models/Track.php b/app/Models/Track.php index 70f5e124..dace9624 100644 --- a/app/Models/Track.php +++ b/app/Models/Track.php @@ -387,7 +387,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable { $trackData = Cache::remember( 'popular_tracks'.$count.'-'.($allowExplicit ? 'explicit' : 'safe'), - 5, + 300, function () use ($allowExplicit, $count, $skip) { /*$query = static ::published() diff --git a/app/Traits/TrackCollection.php b/app/Traits/TrackCollection.php index b6376ee1..b81a6f42 100644 --- a/app/Traits/TrackCollection.php +++ b/app/Traits/TrackCollection.php @@ -170,7 +170,7 @@ trait TrackCollection return 0; } - return Cache::remember($this->getCacheKey('filesize-'.$format), 1440, function () use ($tracks, $format) { + return Cache::remember($this->getCacheKey('filesize-'.$format), 86400, function () use ($tracks, $format) { $size = 0; // Check whether the format is lossless yet not all master files are lossless