fix: set cache expiration to next note publish to show note on publication date

fix episode, podcast and persons forms + episode scheduling
This commit is contained in:
Yassine Doghri 2021-05-25 18:00:09 +00:00
commit 0a66de3e6c
No known key found for this signature in database
GPG key ID: 3E7F89498B960C9F
14 changed files with 117 additions and 44 deletions

View file

@ -67,8 +67,15 @@ class PodcastController extends BaseController
helper('form');
return view('podcast/activity_authenticated', $data);
}
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode(
$this->podcast->id,
);
return view('podcast/activity', $data, [
'cache' => DECADE,
'cache' => $secondsToNextUnpublishedEpisode
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName,
]);
}