Commit b72e7c86 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix: expire default query cache upon scheduled episode publication

fix #81
parent 7fdea63d
......@@ -357,8 +357,14 @@ class PodcastModel extends Model
];
}
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode($podcastId);
cache()
->save($cacheName, $defaultQuery, DECADE);
->save(
$cacheName,
$defaultQuery,
$secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode : DECADE
);
}
return $defaultQuery;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment