mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 12:07:46 +02:00
fix(preview): delete episode preview cache after editing episode
fixes #514
This commit is contained in:
parent
a3fbcc83d9
commit
6a2cdd066e
1 changed files with 2 additions and 2 deletions
|
|
@ -197,7 +197,7 @@ class EpisodeModel extends UuidModel
|
||||||
|
|
||||||
public function getEpisodeByPreviewId(string $previewId): ?Episode
|
public function getEpisodeByPreviewId(string $previewId): ?Episode
|
||||||
{
|
{
|
||||||
$cacheName = "podcast_episode#preview-{$previewId}";
|
$cacheName = "podcast_episode-preview#{$previewId}";
|
||||||
if (! ($found = cache($cacheName))) {
|
if (! ($found = cache($cacheName))) {
|
||||||
$builder = $this->where([
|
$builder = $this->where([
|
||||||
'preview_id' => $this->uuid->fromString($previewId)
|
'preview_id' => $this->uuid->fromString($previewId)
|
||||||
|
|
@ -441,7 +441,7 @@ class EpisodeModel extends UuidModel
|
||||||
cache()
|
cache()
|
||||||
->deleteMatching("podcast-{$episode->podcast->handle}*");
|
->deleteMatching("podcast-{$episode->podcast->handle}*");
|
||||||
cache()
|
cache()
|
||||||
->delete("podcast_episode#{$episode->id}");
|
->deleteMatching('podcast_episode*');
|
||||||
cache()
|
cache()
|
||||||
->deleteMatching("page_podcast#{$episode->podcast_id}*");
|
->deleteMatching("page_podcast#{$episode->podcast_id}*");
|
||||||
cache()
|
cache()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue