mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 03:57:45 +02:00
feat: add cache to ActivityPub sql queries + cache activity and note pages
- authenticated pages are not cached - add AnalyticsTrait to register a podcast webpage hit across mutliple controllers - set actor_id as unique in podcasts table - fix issues with preview card not appearing - update codeigniter4-uuid
This commit is contained in:
parent
54b84f9684
commit
2d297f45b3
42 changed files with 879 additions and 536 deletions
|
|
@ -56,7 +56,7 @@ class SoundbiteModel extends Model
|
|||
*/
|
||||
public function getEpisodeSoundbites(int $podcastId, int $episodeId): array
|
||||
{
|
||||
$cacheName = "podcast_episode#{$episodeId}_soundbites";
|
||||
$cacheName = "podcast#{$podcastId}_episode#{$episodeId}_soundbites";
|
||||
if (!($found = cache($cacheName))) {
|
||||
$found = $this->where([
|
||||
'episode_id' => $episodeId,
|
||||
|
|
@ -77,7 +77,9 @@ class SoundbiteModel extends Model
|
|||
: $data['id']['episode_id'],
|
||||
);
|
||||
|
||||
cache()->delete("podcast_episode#{$episode->id}_soundbites");
|
||||
cache()->delete(
|
||||
"podcast#{$episode->podcast_id}_episode#{$episode->id}_soundbites",
|
||||
);
|
||||
|
||||
// delete cache for rss feed
|
||||
cache()->deleteMatching("podcast#{$episode->podcast_id}_feed*");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue